]> git.sesse.net Git - ffmpeg/blobdiff - avconv_dxva2.c
lzf: update pointer p after realloc
[ffmpeg] / avconv_dxva2.c
index 9cf09cd6b0bce72594bc1be1071b895021c236bb..7578c3f63280411247cfa36bca7f84cb35f7fc45 100644 (file)
@@ -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);