Fixes previous commit (which worked in GStreamer 1.22 but not in 1.24 and newer). Sorry for the noise, should have tested on master before pusshing it :( Fixes: #3918 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8455>