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.
This commit is contained in:
Tim-Philipp Müller 2011-04-30 19:08:25 +01:00
parent 2084044112
commit 65f481ca63

View file

@ -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: