summaryrefslogtreecommitdiff
path: root/avconv_dxva2.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-30 17:11:13 +0100
committerAnton Khirnov <anton@khirnov.net>2016-07-20 16:33:09 +0200
commitda917fcf5183ed249ad1285b8edd330f421376c4 (patch)
tree7c9923ea3f635b2092b98380fb8da6e42a590ede /avconv_dxva2.c
parent1ecb63cd1c1a4ddc5efed4abbc3158b969d8c5e4 (diff)
avconv_dxva2: add a profile check for hevc
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'avconv_dxva2.c')
-rw-r--r--avconv_dxva2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/avconv_dxva2.c b/avconv_dxva2.c
index 9cf09cd6b0..7578c3f632 100644
--- a/avconv_dxva2.c
+++ b/avconv_dxva2.c
@@ -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);