Skip to content

nvcodec: Always calculate num decoded surfaces

The min_num_decoded_surfaces value from CUVIDEOFORMAT can change if the video scales to a different resolution on the fly, and can produce a decoding error if the decoded surface number from the fist format is smaller than the new one.

This can be easily tested with the attached test.gdp file and the following pipeline:

gst-launch-1.0 filesrc location=test.gdp ! gdpdepay ! h264parse ! nvh264dec ! fakesink

This patch avoids this decoding error by ignoring the min_num_decoded_surfaces and always calculating the decoder surfaces number.

cc @seungha.yang

Merge request reports