splitmuxsink: Run gst_iterator_foreach() as long as it returns GST_ITERATOR_RESYNC
authorSebastian Dröge <sebastian@centricular.com>
Wed, 11 Apr 2018 07:12:09 +0000 (09:12 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 11 Apr 2018 07:21:19 +0000 (09:21 +0200)
CID 1434160

gst/multifile/gstsplitmuxsink.c

index f1cb7a4..4b8ef02 100644 (file)
@@ -1212,13 +1212,13 @@ start_next_fragment (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
     GstEvent *ev;
 
     ev = gst_event_new_flush_start ();
-    gst_iterator_foreach (it, _send_event, 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_iterator_foreach (it, _send_event, ev);
+    while (gst_iterator_foreach (it, _send_event, ev) == GST_ITERATOR_RESYNC);
     gst_event_unref (ev);
 
     gst_iterator_free (it);