Commit 4a976200 authored by Philip Langdale's avatar Philip Langdale

avcodec/vdpau: Initialise driver version variable explicitly

If the identification string ever changed, we might not match anything
in the sscanf(). At least have predictable behaviour.
parent 2dee0679
...@@ -208,7 +208,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, ...@@ -208,7 +208,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
return vdpau_error(status); return vdpau_error(status);
if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 && if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 &&
!(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) { !(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) {
int driver_version; int driver_version = 0;
sscanf(info_string, "NVIDIA VDPAU Driver Shared Library %d", &driver_version); sscanf(info_string, "NVIDIA VDPAU Driver Shared Library %d", &driver_version);
if (driver_version < 410) { if (driver_version < 410) {
av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n"); av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment