adder: Do not send flush_start event with the stream lock taken
authorThibault Saunier <thibault.saunier@collabora.com>
Thu, 4 Jul 2013 16:54:59 +0000 (12:54 -0400)
committerThibault Saunier <thibault.saunier@collabora.com>
Fri, 5 Jul 2013 02:10:13 +0000 (22:10 -0400)
FLUSH_START is not serialized, so the lock should not be taken when
sending it.

gst/adder/gstadder.c

index ca3c7e4..78f7c82 100644 (file)
@@ -834,10 +834,10 @@ gst_adder_sink_event (GstCollectPads * pads, GstCollectData * pad,
     }
     case GST_EVENT_FLUSH_START:
       /* ensure that we will send a flush stop */
-      GST_COLLECT_PADS_STREAM_LOCK (adder->collect);
-      adder->flush_stop_pending = TRUE;
       res = gst_collect_pads_event_default (pads, pad, event, discard);
       event = NULL;
+      GST_COLLECT_PADS_STREAM_LOCK (adder->collect);
+      adder->flush_stop_pending = TRUE;
       GST_COLLECT_PADS_STREAM_UNLOCK (adder->collect);
       break;
     case GST_EVENT_FLUSH_STOP: