pad: Don't forget to take the object lock when getting a sticky event

This commit is contained in:
Sebastian Dröge 2011-05-18 16:29:10 +02:00
parent 6b30f0b056
commit 99962c72e4

View 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;
}