mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
qtdemux: drop flushes from our own offset seek
Prevents downstream from receiving flushes for a seek only in upstream. Those seeks are only to start reading from the right offset when skipping or returning to qt atoms. https://bugzilla.gnome.org/show_bug.cgi?id=758928
This commit is contained in:
parent
7b026e4bc0
commit
0906d822ad
2 changed files with 17 additions and 0 deletions
|
@ -2127,6 +2127,14 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
|||
res = TRUE;
|
||||
goto drop;
|
||||
}
|
||||
case GST_EVENT_FLUSH_START:
|
||||
{
|
||||
if (gst_event_get_seqnum (event) == demux->offset_seek_seqnum) {
|
||||
gst_event_unref (event);
|
||||
goto drop;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
{
|
||||
guint64 dur;
|
||||
|
@ -2134,6 +2142,11 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
|||
dur = demux->segment.duration;
|
||||
gst_qtdemux_reset (demux, FALSE);
|
||||
demux->segment.duration = dur;
|
||||
|
||||
if (gst_event_get_seqnum (event) == demux->offset_seek_seqnum) {
|
||||
gst_event_unref (event);
|
||||
goto drop;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_EOS:
|
||||
|
@ -5478,7 +5491,10 @@ qtdemux_seek_offset (GstQTDemux * demux, guint64 offset)
|
|||
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, offset,
|
||||
GST_SEEK_TYPE_NONE, -1);
|
||||
|
||||
/* store seqnum to drop flush events, they don't need to reach downstream */
|
||||
demux->offset_seek_seqnum = gst_event_get_seqnum (event);
|
||||
res = gst_pad_push_event (demux->sinkpad, event);
|
||||
demux->offset_seek_seqnum = 0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ struct _GstQTDemux {
|
|||
* newsegment in TIME format which likely
|
||||
* means that upstream is driving the pipeline
|
||||
* (adaptive demuxers / dlna) */
|
||||
guint32 offset_seek_seqnum;
|
||||
gint64 seek_offset;
|
||||
gint64 push_seek_start;
|
||||
gint64 push_seek_stop;
|
||||
|
|
Loading…
Reference in a new issue