pad: Don't forget to take the object lock when getting a sticky event
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 18 May 2011 14:29:10 +0000 (16:29 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 18 May 2011 14:29:10 +0000 (16:29 +0200)
gst/gstpad.c

index 5938744c1a6ee56cc4f86686addb560ca77c8467..35ecd16190900b7a689f15c5e957503b6ee652cf 100644 (file)
@@ -4899,11 +4899,13 @@ gst_pad_get_sticky_event (GstPad * pad, GstEventType event_type,
 
   idx = GST_EVENT_STICKY_IDX_TYPE (event_type);
 
+  GST_OBJECT_LOCK (pad);
   if (!active || pad->priv->events[idx].active) {
     if ((event = pad->priv->events[idx].event)) {
       gst_event_ref (event);
     }
   }
+  GST_OBJECT_UNLOCK (pad);
 
   return event;
 }