Fixes #3430 Fixes #3576 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6959>