From e276d3c836e582228254f5c7a9c6253486312345 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 5 Nov 2022 09:20:03 +0100 Subject: [PATCH] decodebin3: Protect input freeing with the input lock Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 274b84cce7..c5a1240732 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -973,6 +973,7 @@ static void free_input (GstDecodebin3 * dbin, DecodebinInput * input) { GST_DEBUG ("Freeing input %p", input); + INPUT_LOCK (dbin); gst_ghost_pad_set_target (GST_GHOST_PAD (input->ghost_sink), NULL); gst_element_remove_pad (GST_ELEMENT (dbin), input->ghost_sink); if (input->parsebin) { @@ -986,6 +987,7 @@ free_input (GstDecodebin3 * dbin, DecodebinInput * input) if (input->collection) gst_object_unref (input->collection); g_free (input); + INPUT_UNLOCK (dbin); } static void