From 26d6532702e3e10ec224d0ff82cfe09fe2184d21 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 11 Jun 2019 23:18:24 +1000 Subject: [PATCH] splitmuxsrc: Ignore duplicate seeks Use the seqnum to ignore duplicated seek events. --- gst/multifile/gstsplitmuxsrc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c index 7bef5f2a9c..96faa88e40 100644 --- a/gst/multifile/gstsplitmuxsrc.c +++ b/gst/multifile/gstsplitmuxsrc.c @@ -1319,6 +1319,12 @@ splitmux_src_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) SPLITMUX_SRC_UNLOCK (splitmux); goto error; } + if (splitmux->segment_seqnum == seqnum) { + GST_DEBUG_OBJECT (splitmux, "Ignoring duplicate seek event"); + SPLITMUX_SRC_UNLOCK (splitmux); + ret = TRUE; + goto done; + } gst_segment_copy_into (&splitmux->play_segment, &tmp); @@ -1394,6 +1400,7 @@ splitmux_src_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) break; } +done: gst_event_unref (event); error: return ret;