mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg_dxva2: add a profile check for hevc
This commit is contained in:
parent
1ec14612a5
commit
a655bc8344
@ -637,6 +637,12 @@ int dxva2_init(AVCodecContext *s)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->codec_id == AV_CODEC_ID_HEVC &&
|
||||||
|
s->profile != FF_PROFILE_HEVC_MAIN && s->profile != FF_PROFILE_HEVC_MAIN_10) {
|
||||||
|
av_log(NULL, loglevel, "Unsupported HEVC profile for DXVA2 HWAccel: %d\n", s->profile);
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->decoder)
|
if (ctx->decoder)
|
||||||
dxva2_destroy_decoder(s);
|
dxva2_destroy_decoder(s);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user