mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avconv_dxva2: add a profile check for hevc
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
1ecb63cd1c
commit
da917fcf51
@ -422,6 +422,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);
|
||||||
|
}
|
||||||
|
|
||||||
av_buffer_unref(&ctx->hw_frames_ctx);
|
av_buffer_unref(&ctx->hw_frames_ctx);
|
||||||
|
|
||||||
ret = dxva2_create_decoder(s);
|
ret = dxva2_create_decoder(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user