If the identification string ever changed, we might not match anything
in the sscanf(). At least have predictable behaviour.
... | ... |
@@ -208,7 +208,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, |
208 | 208 |
return vdpau_error(status); |
209 | 209 |
if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 && |
210 | 210 |
!(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) { |
211 |
- int driver_version; |
|
211 |
+ int driver_version = 0; |
|
212 | 212 |
sscanf(info_string, "NVIDIA VDPAU Driver Shared Library %d", &driver_version); |
213 | 213 |
if (driver_version < 410) { |
214 | 214 |
av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n"); |