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