RTSP h264 corrupted decoding - "reference in DPB was never decoded"

We have a GStreamer rtspsrc pipeline which works well 90% of the time.

rtspsrc -> depay -> parse -> omxh264dec -> videoconvert -> appsink

However, for some setups, for reasons we can’t determine, we are consistently seeing corrupted output from the pipeline. Specifically, the frames look like they are diff frame computed against the wrong iframe (ex. you see a person in two places at once).

I’m not sure if it’s in all of these cases (still trying to verify), but I did spot the message:

“reference in DPB was never decoded”

On the console for this process. Sounds like it’s related… What could cause this? Any things to try?

(FWIW, we tried nvv4l2decoder as well, and have the same issue.)


It looks like the bitstream is corrupted and decoder cannot decode reference frames. You may dump the bitstream and do decoding simultaneously:

rtspsrc -> depay -> tee -> parse -> omxh264dec -> videoconvert -> appsink
                        -> parse -> stream-format=byte-stream -> filesink

And when the issue happens, try to run local video decoding:

filesrc -> parse -> omxh264dec(or avdec_h264) ! nvvidconv ! nvoverlaysink

Hardware decoder should work as well as software decoder. If hardware decoder reports the error, it should also be reported by software decoder as well.

Thank you Dane, I will try this.

However, one thing I forgot to mention is that when playing the stream using VLC I do not see the problem/artifacts…

You may also try nvv4l2decoder plugin. If you have followed the steps and confirm it is an NVIDIA issue. Please share us the dump h264 stream and then we can reproduce the issue.

Finally (though less easily) I was able to repro the issue with the software decoder was well, so I’ll take this as proof that it’s not the hardware decoder’s fault (even though VLC gets it right somehow). Thanks for the help!