mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
pad: clear probes holding mutex
Protect clearing probes against concurrent modification which might happen due to dispose does NOT guarantee that the object is not used anymore, as it could be referenced again and so being continued used. So, as in the rest of places where probes hook list is used, on dispose it should be accessed holding the mutex "GST_OBJECT_LOCK (pad);" as GHookList is not thread-safe. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/798>
This commit is contained in:
parent
4eef67cc7e
commit
fad603011d
1 changed files with 1 additions and 2 deletions
|
@ -723,9 +723,8 @@ gst_pad_dispose (GObject * object)
|
||||||
|
|
||||||
GST_OBJECT_LOCK (pad);
|
GST_OBJECT_LOCK (pad);
|
||||||
remove_events (pad);
|
remove_events (pad);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
|
||||||
|
|
||||||
g_hook_list_clear (&pad->probes);
|
g_hook_list_clear (&pad->probes);
|
||||||
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue