From: Jan Schmidt Date: Mon, 17 Jan 2022 18:48:08 +0000 (+1100) Subject: playbin3: Hold playbin lock on pad-added X-Git-Tag: 1.22.0~2180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52d9614d47f1a88f5939abf5bc273dcda777d2e8;p=platform%2Fupstream%2Fgstreamer.git playbin3: Hold playbin lock on pad-added Take the playbin lock when accessing the combiner to add a new pad to link to. Fixes races against streams-selected messages triggering reconfiguration. Part-of: --- diff --git a/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c b/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c index 1192101..55f7165 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c @@ -3113,6 +3113,7 @@ pad_added_cb (GstElement * uridecodebin, GstPad * pad, GstSourceGroup * group) goto unknown_type; } + GST_PLAY_BIN3_LOCK (playbin); combine = &playbin->combiner[pb_stream_type]; combiner_control_pad (playbin, combine, pad); @@ -3127,6 +3128,7 @@ pad_added_cb (GstElement * uridecodebin, GstPad * pad, GstSourceGroup * group) group->pending_about_to_finish = FALSE; emit_about_to_finish (playbin); } + GST_PLAY_BIN3_UNLOCK (playbin); GST_PLAY_BIN3_SHUTDOWN_UNLOCK (playbin);