[FFmpeg-devel] [PATCH 3/3] ffmpeg_dxva2: add a profile check for hevc
Hendrik Leppkes
h.leppkes at gmail.com
Thu Jan 28 12:58:27 CET 2016
---
ffmpeg_dxva2.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c
index 1b62bb9..35bedec 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);
--
2.6.2.windows.1
More information about the ffmpeg-devel
mailing list