From 65f481ca631997d9840278ff68d32bb1c6c92c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 30 Apr 2011 19:08:25 +0100 Subject: [PATCH] chopmydata: don't mess with adapter from non-streaming thread on FLUSH_START Don't try to push remaining data in the adapter on receiving a FLUSH event, just flush the adapter. Do this on FLUSH_STOP, however, which is serialized, unlike FLUSH_START, so we don't mess with the adapter at the same time as the streaming thread. --- gst/debugutils/gstchopmydata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst/debugutils/gstchopmydata.c b/gst/debugutils/gstchopmydata.c index 0d50571d69..49fc083a18 100644 --- a/gst/debugutils/gstchopmydata.c +++ b/gst/debugutils/gstchopmydata.c @@ -337,11 +337,10 @@ gst_chop_my_data_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: - /* FIXME: I don't think it should be doing this in FLUSH_START */ - gst_chop_my_data_process (chopmydata, TRUE); res = gst_pad_push_event (chopmydata->srcpad, event); break; case GST_EVENT_FLUSH_STOP: + gst_adapter_clear (chopmydata->adapter); res = gst_pad_push_event (chopmydata->srcpad, event); break; case GST_EVENT_NEWSEGMENT: