mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-08 03:32:18 +00:00
qtdemux: matroskademux: Ignore repeated seek events
Similar to what was done in adaptivedemux, ignore seek events we've already handled - such as when they are received on every srcpad of files with lots of streams.
This commit is contained in:
parent
a56a01f15f
commit
d76bd1913f
2 changed files with 19 additions and 0 deletions
|
@ -1736,6 +1736,14 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstObject * parent,
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
GstClockTime ts = gst_util_get_timestamp ();
|
GstClockTime ts = gst_util_get_timestamp ();
|
||||||
#endif
|
#endif
|
||||||
|
guint32 seqnum = gst_event_get_seqnum (event);
|
||||||
|
|
||||||
|
if (seqnum == qtdemux->segment_seqnum) {
|
||||||
|
GST_LOG_OBJECT (pad,
|
||||||
|
"Drop duplicated SEEK event seqnum %" G_GUINT32_FORMAT, seqnum);
|
||||||
|
gst_event_unref (event);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (qtdemux->upstream_format_is_time && qtdemux->fragmented) {
|
if (qtdemux->upstream_format_is_time && qtdemux->fragmented) {
|
||||||
/* seek should be handled by upstream, we might need to re-download fragments */
|
/* seek should be handled by upstream, we might need to re-download fragments */
|
||||||
|
|
|
@ -2368,6 +2368,17 @@ gst_matroska_demux_handle_src_event (GstPad * pad, GstObject * parent,
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
guint32 seqnum = gst_event_get_seqnum (event);
|
||||||
|
if (seqnum == demux->segment_seqnum) {
|
||||||
|
GST_LOG_OBJECT (pad,
|
||||||
|
"Drop duplicated SEEK event seqnum %" G_GUINT32_FORMAT, seqnum);
|
||||||
|
gst_event_unref (event);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!demux->streaming)
|
if (!demux->streaming)
|
||||||
res = gst_matroska_demux_handle_seek_event (demux, pad, event);
|
res = gst_matroska_demux_handle_seek_event (demux, pad, event);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue