splitmuxsink: set the same seqnum on flush_start / flush_stop

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
This commit is contained in:
Mathieu Duponchelle 2019-05-22 21:40:52 +02:00
parent ec5fa49631
commit ddbbe5d277

View 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);