decodebin3: fix random hang when remove failing stream
authorHaihua Hu <jared.hu@nxp.com>
Wed, 10 May 2023 08:34:16 +0000 (16:34 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 17 May 2023 11:02:22 +0000 (11:02 +0000)
commitd784bbe6cac55cde11da2197dba16b5d58a0a8ff
tree3a332e0053115d2adbeec61136c4c1b50d7a11b9
parentc932134637dbf02af7db88c598e8dc95cdab7dc0
decodebin3: fix random hang when remove failing stream

When reconfigure_output_stream entry missing decoder path,
requested_selection should been update with what is really
active/selected immdiately with SELECTION_LOCK hold. So
use an optional message return from reconfigure_output_stream
and post it after release SELECTION_LOCK. This can make sure
other thread call to check_slot_reconfiguration will got
a correct requested_selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4656>
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c