Fixing regression of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7814>