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

Hendrik Leppkes git at videolan.org
Tue Jan 31 18:05:53 EET 2017


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

avconv_dxva2: add a profile check for hevc

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

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

diff --git a/avconv_dxva2.c b/avconv_dxva2.c
index 9cf09cd..7578c3f 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);



More information about the ffmpeg-cvslog mailing list