aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2019-03-27 14:33:36 +0800
committerZhong Li <zhong.li@intel.com>2019-04-03 22:57:55 +0800
commitc745bedd18afea19e3eb75da3d094d542b02a88b (patch)
tree7e0583d6be6e37c27032eb00cec29bb508401ee9 /libavcodec
parent6f9d7c556d5f466c604fe76723950b834c5d1af4 (diff)
downloadffmpeg-c745bedd18afea19e3eb75da3d094d542b02a88b.tar.gz
lavc/qsvenc: enable hevc coding options configuration
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index e76c580b4a..55f1223f02 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -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);