From: Jan Schmidt Date: Tue, 21 Mar 2017 13:38:51 +0000 (+1100) Subject: qtdemux: matroskademux: Ignore repeated seek events X-Git-Tag: 1.12.2~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d76bd1913fe3b9ae7b6d4973f8e0ac57705ce91b;p=platform%2Fupstream%2Fgst-plugins-good.git 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. --- diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index ff51d8c..8d304bd 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -1736,6 +1736,14 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstObject * parent, #ifndef GST_DISABLE_GST_DEBUG GstClockTime ts = gst_util_get_timestamp (); #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) { /* seek should be handled by upstream, we might need to re-download fragments */ diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 2523367..2fe5b3b 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2368,6 +2368,17 @@ gst_matroska_demux_handle_src_event (GstPad * pad, GstObject * parent, gst_event_unref (event); 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) res = gst_matroska_demux_handle_seek_event (demux, pad, event); else