qtdemux: send gap event for sparse streams in push mode

This allows to pre-roll at least if the next subtitle buffer
is far away.
This commit is contained in:
Arnaud Vrac 2013-07-16 21:59:37 +02:00 committed by Sebastian Dröge
parent 1237898351
commit ae67c13416

View file

@ -4836,7 +4836,14 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf)
gst_qtdemux_push_pending_newsegment (demux);
/* clear to send tags on all streams */
for (i = 0; i < demux->n_streams; i++) {
gst_qtdemux_push_tags (demux, demux->streams[i]);
stream = demux->streams[i];
gst_qtdemux_push_tags (demux, stream);
if (stream->sparse) {
GST_INFO_OBJECT (demux, "Sending gap event on stream %d", i);
gst_pad_push_event (stream->pad,
gst_event_new_gap (stream->segment.position,
GST_CLOCK_TIME_NONE));
}
}
}