Skip to content

gstreamer: bin: Don't unlock unlocked mutex in gst_bin_remove_func()

medithe requested to merge (removed):medithe-main-patch-59193 into main

Calling g_mutex_unlock(mutex) leads to an undefined behavior if mutex is not locked by the current thread. Since GST_OBJECT_UNLOCK(mutex) is defined as g_mutex_unlock(mutex), a call to GST_OBJECT_UNLOCK(mutex) leads also to undefined behavior, if it is not locked by the current thread.

This commit fixes undefined behavior, if element is already unlocked.

Merge request reports

Loading