bin: Don't propagate state change errors of elements in locked state
authorSebastian Dröge <sebastian@centricular.com>
Tue, 23 Aug 2022 16:40:54 +0000 (19:40 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 25 Aug 2022 15:33:07 +0000 (15:33 +0000)
commit404b646b6ecff6db17836f8eab3efb208989f2a1
treef5f87e1744f3c29c08d4f7d08965de4a41f13509
parent65b15f72b5fac52f8a97c44172f9aeb45b1196d9
bin: Don't propagate state change errors of elements in locked state

Theoretically having elements in locked state should not have any effect
at all when the surrounding bin is doing state changes. However
previously a state change error of a locked element would cause the
bin's state change to also fail, which is clearly not intended.

State change failures of locked elements are to be handled by whoever
set the element to locked state. By always returning them here it is
impossible for the owner of the element to handle state change failures
gracefully without potentially affecting the whole pipeline's state
changes.

Non-failure returns are still returned as-is as the distinction between
ASYNC/NO_PREROLL/SUCCESS has big consequences on the state changes of
the bin and overall pipeline. Theoretically SUCCESS should also be
returned in all cases but I can't estimate the effects this would have
on the overall pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2932>
subprojects/gstreamer/gst/gstbin.c