Commit da917fcf authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Anton Khirnov

avconv_dxva2: add a profile check for hevc

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 1ecb63cd
......@@ -422,6 +422,12 @@ int dxva2_init(AVCodecContext *s)
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);
ret = dxva2_create_decoder(s);
......
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