aggregator: fix locking
authorTim-Philipp Müller <tim@centricular.com>
Sun, 6 Jul 2014 15:17:06 +0000 (16:17 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:25 +0000 (15:10 +0000)
We would unlock a mutex we never locked on SEGMENT
events.

libs/gst/base/gstaggregator.c

index 0d80f3c..8a3a3bf 100644 (file)
@@ -637,9 +637,9 @@ _sink_event (GstAggregator * self, GstAggregatorPad * aggpad, GstEvent * event)
     }
     case GST_EVENT_SEGMENT:
     {
+      PAD_LOCK_EVENT (aggpad);
       gst_event_copy_segment (event, &aggpad->segment);
       PAD_UNLOCK_EVENT (aggpad);
-
       goto eat;
     }
     case GST_EVENT_STREAM_START: