A problem on messages “unsupported codec, unsupported stream”

My H264 decoding module is adapted from the example “02_video_dec_cuda” (in the directory “jetson_mutimedia_api/samples/”) and it works well when getting data from offline files. However, it does not perform as my expectation when getting data online. When receiving bad data from remote servers, the module constantly displays the message,
“NVMEDIABufferProcessing: 1504: NvMediaParserParse unsupported Codes”,
“NvMMLiteNVMEDIADecDoWork: 1982: NVMEDIA Video Dec unsupported Stream”,
and don’t decode the good data received later.

I hope to adapt the code in“02_video_dec_cuda” such that my module can recover to work from displaying messages as soon as good data is received, or, directly, can ignore the bad data that causes error messages.

Can somebody please point me where the relevant code is and how to adapt it.

Looks like the h264 stream is broken. Decoder can handle tiny error in h264 stream. However, for seeing the message, the h264 stream is seriously broken and you would need to destroy and re-initialize NvVideoDecoder.

Hi DaneLLL,
It is a useful suggestion to destroy and restart the Decorder when it doesn’t work. It seems NvMediaVideoDecoderDestroy is the function for destroying the Decorder. However, How can I know whether h264 stream is broken? How can I capture the message “… unsupported stream”?
Many Thanks.

Decoder is created through

ctx.dec = NvVideoDecoder::createVideoDecoder("dec0");

For this error, you would need ot destroy it by calling

delete ctx.dec;