Hi
I am still investigating the video decoder behavior and I face another issue. As described here, I wrote a sample app to exercise video decoding. This app is single threaded, and handles both output and capture plane in the same loop. The main loop basically does:
while (!end of file)
read a frame from file
queue encoded frame to output plane
try to dequeue already processed encoded frame from output plane
queue a buffer to capture plane
try to dequeue already decoded frame from capture plane
wait a certain amount of time
The app works fine, when the wait delay is 0. However, as soon as I introduce a delay (in milliseconds), I see errors like :
reference in DPB was never decoded
or
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
I’ve attached the sample app to the topic. For example:
# Run with no delay
# No decoding errors
decode_error -i bbb_sunflower_1080p_30fps_normal.m2ts --delay 0
# Introduce a 100ms delay in the decoding loop
# will produce reference in DPB was never decoded and NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
decode_error -i bbb_sunflower_1080p_30fps_normal.m2ts --delay 100
What could explain this behavior ? Does the decoder expect the buffers to be queued / unqueued at a minimun rate ? Does the decoder recycle some buffers after a certain amount of time ?
Of course a real application will not introduce such delay but in case of input stream coming from the network, where I can not guarantee the packets will arrive at fixed rate, the delay simulates network stalls. And according to other topics, I saw a lot of person having troubles with RTSP streams and reference in DPB was never decoded, including me. In my case this is not a connection issue, no packets are lost.
Regards
Thomas
decode_error.tar.gz (7.5 KB)