This patch fixes issue https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1565 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3399>