pad: clear probes holding mutex
authorMiguel Paris <mparisdiaz@gmail.com>
Fri, 16 Apr 2021 09:14:31 +0000 (11:14 +0200)
committerMiguel Paris <mparisdiaz@gmail.com>
Mon, 19 Apr 2021 12:58:43 +0000 (14:58 +0200)
commitfad603011d590a2c568730ffc3adf1d6bf5a778e
tree818858f8145c2afd7bfc0b3121c2520c6b10ccfb
parent4eef67cc7ec36903801e3bbb62b43411b1f00b94
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>
gst/gstpad.c