pulsesink: Flush the ringbuffer on GAP events without duration

This is required to properly start the ringbuffer and clock.
This commit is contained in:
Sebastian Dröge 2012-10-24 11:17:55 +02:00
parent 83a47cdd0e
commit 69246dfef7

View file

@ -2812,6 +2812,14 @@ gst_pulsesink_event (GstBaseSink * sink, GstEvent * event)
break;
}
case GST_EVENT_GAP:{
GstClockTime timestamp, duration;
gst_event_parse_gap (event, &timestamp, &duration);
if (duration == GST_CLOCK_TIME_NONE)
gst_pulsesink_flush_ringbuffer (pulsesink);
break;
}
case GST_EVENT_EOS:
gst_pulsesink_flush_ringbuffer (pulsesink);
break;