Handle flush-start and flush-stop sent on the element as well and send them
downstream. Make sure to send a segment event after the flush stop.
switch (GST_EVENT_TYPE (event)) {
/* bidirectional events */
case GST_EVENT_FLUSH_START:
switch (GST_EVENT_TYPE (event)) {
/* bidirectional events */
case GST_EVENT_FLUSH_START:
+ GST_DEBUG_OBJECT (src, "pushing flush-start event downstream");
+ result = gst_pad_push_event (src->srcpad, event);
+ event = NULL;
+ break;
case GST_EVENT_FLUSH_STOP:
case GST_EVENT_FLUSH_STOP:
+ GST_LIVE_LOCK (src->srcpad);
+ src->priv->segment_pending = TRUE;
/* sending random flushes downstream can break stuff,
* especially sync since all segment info will get flushed */
/* sending random flushes downstream can break stuff,
* especially sync since all segment info will get flushed */
+ GST_DEBUG_OBJECT (src, "pushing flush-stop event downstream");
+ result = gst_pad_push_event (src->srcpad, event);
+ GST_LIVE_UNLOCK (src->srcpad);
+ event = NULL;
break;
/* downstream serialized events */
break;
/* downstream serialized events */