Backport of "nvcodec: fix bounds for auto-select GPU enumeration" into 1.22
requested to merge tpm/gstreamer:mr-5438-backport-into-1.22-fix-nvencoder-autoselect-8-gpu-support into 1.22
Backport of !5438 (merged) "nvcodec: fix bounds for auto-select GPU enumeration".
Commits: