mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-12 09:15:29 +00:00
pad: Don't forget to take the object lock when getting a sticky event
This commit is contained in:
parent
6b30f0b056
commit
99962c72e4
1 changed files with 2 additions and 0 deletions
|
@ -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 (!active || pad->priv->events[idx].active) {
|
||||||
if ((event = pad->priv->events[idx].event)) {
|
if ((event = pad->priv->events[idx].event)) {
|
||||||
gst_event_ref (event);
|
gst_event_ref (event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue