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 5938744..35ecd16 100644 (file)
@@ -4899,11 +4899,13 @@ gst_pad_get_sticky_event (GstPad * pad, GstEventType event_type,
 
   idx = GST_EVENT_STICKY_IDX_TYPE (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);
     }
   }
   if (!active || pad->priv->events[idx].active) {
     if ((event = pad->priv->events[idx].event)) {
       gst_event_ref (event);
     }
   }
+  GST_OBJECT_UNLOCK (pad);
 
   return event;
 }
 
   return event;
 }