splitmuxsink: set the same seqnum on flush_start / flush_stop
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 22 May 2019 19:40:52 +0000 (21:40 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Thu, 13 Jun 2019 14:44:47 +0000 (16:44 +0200)
It's currently not made mandatory by aggregator, but it might
eventually be, and is more consistent behaviour

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/977

gst/multifile/gstsplitmuxsink.c

index d859eae..ab9fa00 100644 (file)
@@ -1703,14 +1703,17 @@ start_next_fragment (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
     } else {
       GstIterator *it = gst_element_iterate_sink_pads (muxer);
       GstEvent *ev;
+      guint32 seqnum;
 
       ev = gst_event_new_flush_start ();
+      seqnum = gst_event_get_seqnum (ev);
       while (gst_iterator_foreach (it, _send_event, ev) == GST_ITERATOR_RESYNC);
       gst_event_unref (ev);
 
       gst_iterator_resync (it);
 
       ev = gst_event_new_flush_stop (TRUE);
+      gst_event_set_seqnum (ev, seqnum);
       while (gst_iterator_foreach (it, _send_event, ev) == GST_ITERATOR_RESYNC);
       gst_event_unref (ev);