]> git.sesse.net Git - ffmpeg/commitdiff
lavc/qsvenc: enable hevc coding options configuration
authorZhong Li <zhong.li@intel.com>
Wed, 27 Mar 2019 06:33:36 +0000 (14:33 +0800)
committerZhong Li <zhong.li@intel.com>
Wed, 3 Apr 2019 14:57:55 +0000 (22:57 +0800)
Signed-off-by: Zhong Li <zhong.li@intel.com>
libavcodec/qsvenc.c

index e76c580b4ac92045919c12c7a689a9b9c66fd828..55f1223f02eab437b262f20e0168a499048b750c 100644 (file)
@@ -629,9 +629,10 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
 #endif
     }
 
-    // the HEVC encoder plugin currently fails if coding options
-    // are provided
-    if (avctx->codec_id != AV_CODEC_ID_HEVC) {
+    // The HEVC encoder plugin currently fails with some old libmfx version if coding options
+    // are provided. Can't find the extract libmfx version which fixed it, just enable it from
+    // V1.28 in order to keep compatibility security.
+    if ((avctx->codec_id != AV_CODEC_ID_HEVC) || QSV_RUNTIME_VERSION_ATLEAST(q->ver, 1, 28)) {
         q->extco.Header.BufferId      = MFX_EXTBUFF_CODING_OPTION;
         q->extco.Header.BufferSz      = sizeof(q->extco);