Skip to content

nvcodec: fix missing IDR data for nvh264enc and nvh265enc

This patch solves the symptom of non-presence of VPS, SPS and PPS data in IDR frames.
The previously observed symptom is that it was not possible to perform stream decoding if the receiver had not received this data.
If the receiver is launched before the transmitter, the fault does not occur. Otherwise, it is not possible to decode the frames.

Example (respecting the call order):
$ gst-launch-1.0 videotestsrc ! nvh264enc ! rtph264pay ! udpsink
$ gst-launch-1.0 udpsrc address=localhost ! \
"application/x-rtp,encoding-name=(string)H264" ! rtph264depay ! \
h264parse ! nvh264dec ! queue ! videoconvert ! ximagesink

The stream will not be decoded.
This patch fixes this symptom.
It has been applied for nvh264enc and nvh265enc encoders.

Merge request reports