aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_dxva2.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-30 17:11:13 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2016-02-15 12:34:19 +0100
commita655bc834479024ff4d60d0b8ecca290e73eb96c (patch)
tree54c67faf3852addba5f793cf0d96594fa5644576 /ffmpeg_dxva2.c
parent1ec14612a5bd3506ffd755f8d42db776bfa40ae8 (diff)
downloadffmpeg-a655bc834479024ff4d60d0b8ecca290e73eb96c.tar.gz
ffmpeg_dxva2: add a profile check for hevc
Diffstat (limited to 'ffmpeg_dxva2.c')
-rw-r--r--ffmpeg_dxva2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c
index 43509b464e..09af6c7929 100644
--- a/ffmpeg_dxva2.c
+++ b/ffmpeg_dxva2.c
@@ -637,6 +637,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);
+ }
+
if (ctx->decoder)
dxva2_destroy_decoder(s);