nvh264sldec: Extra frames latency when decoding RTP stream
GStreamer 1.22.1
Start a H264 stream :
- gst-launch-1.0 v4l2src ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! queue ! videoconvert ! video/x-raw, format=NV12 ! timeoverlay ! tee name=t ! queue ! glimagesink sync=false t. ! queue ! nvh264enc ! video/x-h264, profile=high ! queue ! h264parse ! rtph264pay config-interval=-1 ! udpsink host=127.0.0.1 port=5000
When the stream is decoded with avdec_h264 or nvh264dec, the latency is less than 40ms => OK
- gst-launch-1.0 udpsrc uri=udp://127.0.0.1:5000 caps="application/x-rtp,media=video,encoding-name=H264,clock-rate=90000" ! rtph264depay ! h264parse ! nvh264dec ! queue ! glimagesink sync=false
But when stream is decoded with nvh264sldec, the latency is about 400ms => KO
- gst-launch-1.0 udpsrc uri=udp://127.0.0.1:5000 caps="application/x-rtp,media=video,encoding-name=H264,clock-rate=90000" ! rtph264depay ! h264parse ! nvh264sldec ! queue ! glimagesink sync=false