gst_element_remove_pad() is triggering a call to
gst_decodebin3_input_pad_unlink() which needs the input lock as well,
resulting in a dead lock.
Fix #1667
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3614>
gst_clear_object (&dbin->collection);
+ INPUT_LOCK (dbin);
if (dbin->main_input) {
free_input (dbin, dbin->main_input);
dbin->main_input = NULL;
free_input (dbin, input);
dbin->other_inputs = g_list_delete_link (dbin->other_inputs, walk);
}
+ INPUT_UNLOCK (dbin);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
GST_LOG_OBJECT (dbin, "Freeing input %p", input);
+ INPUT_UNLOCK (dbin);
gst_element_remove_pad (GST_ELEMENT (dbin), input->ghost_sink);
+ INPUT_LOCK (dbin);
+
g_free (input);
}