[FFmpeg-cvslog] ffmpeg_dxva2: add a profile check for hevc

Hendrik Leppkes git at videolan.org
Mon Feb 15 12:42:40 CET 2016


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat Jan 30 17:11:13 2016 +0100| [a655bc834479024ff4d60d0b8ecca290e73eb96c] | committer: Hendrik Leppkes

ffmpeg_dxva2: add a profile check for hevc

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a655bc834479024ff4d60d0b8ecca290e73eb96c
---

 ffmpeg_dxva2.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c
index 43509b4..09af6c7 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);
 



More information about the ffmpeg-cvslog mailing list