VideoCapture::open() blocks when using CAP_GSTREAMER

Hi,

I am currently facing an issue with VideoCapture::open() method when using CAP_GSTREAMER as a receiver.
The VideoCapture::open() method blocks until something is received thus blocking my whole application.
I did not find any way to make the open() method fail or return.

I am using OpenCV 4.1, and I tried with OpenCV 4.6 and I am still facing the same issue.
However with OpenCV 4.6 I get an error message I did not have before:

global /opt/opencv/modules/videoio/src/cap_gstreamer.cpp (1405) open OpenCV | GStreamer warning: Cannot query video position: status=1, value=0, duration=-1

This is the pipeline I am using;
auto command = fmt::format(“udpsrc port={} timeout={} caps=application/x-rtp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! appsink sync=false”, port, timeout);

And this is my call to open:
m_capture->open(command, cv::VideoCaptureAPIs::CAP_GSTREAMER);

Does anyone has an idea of why I am facing this issue ?

Thanks in advance,

Wilfred