baseparse: push pending events before GAP event

A GAP event is handled as an empty buffer by sinks and they expect
to receive start up events before GAP events (like a segment).

This is important specially if there is a GAP at the beginning of
a stream (before any buffers) so that the segment event can be
pushed downstream before the GAP

https://bugzilla.gnome.org/show_bug.cgi?id=721350
This commit is contained in:
Thiago Santos 2014-01-02 13:43:54 -03:00
parent d917eb7160
commit accaadf52a

View file

@ -1186,6 +1186,9 @@ gst_base_parse_sink_event_default (GstBaseParse * parse, GstEvent * event)
case GST_EVENT_GAP:
{
GST_DEBUG_OBJECT (parse, "draining current data due to gap event");
gst_base_parse_push_pending_events (parse);
if (parse->segment.rate > 0.0)
gst_base_parse_drain (parse);
else