videomixer: don't send flush_stop twice.
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>
Tue, 20 Aug 2013 20:12:03 +0000 (22:12 +0200)
committerThibault Saunier <thibault.saunier@collabora.com>
Sat, 24 Aug 2013 00:17:11 +0000 (20:17 -0400)
If we get flush start and a seek we need to only send flush_stop once.

More info at #706441

gst/videomixer/videomixer2.c

index 1a06622..1fe4319 100644 (file)
@@ -1435,6 +1435,7 @@ gst_videomixer2_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
          * whichever happens first.
          */
         g_atomic_int_set (&mix->flush_stop_pending, TRUE);
+        g_atomic_int_set (&mix->waiting_flush_stop, FALSE);
       }
 
       GST_COLLECT_PADS_STREAM_UNLOCK (mix->collect);
@@ -1736,6 +1737,7 @@ gst_videomixer2_sink_event (GstCollectPads * pads, GstCollectData * cdata,
     }
     case GST_EVENT_FLUSH_START:
       g_atomic_int_set (&mix->waiting_flush_stop, TRUE);
+      g_atomic_int_set (&mix->flush_stop_pending, FALSE);
       ret = gst_collect_pads_event_default (pads, cdata, event, discard);
       event = NULL;
       break;