summaryrefslogtreecommitdiff
path: root/libavcodec/qsvenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-01-13 15:27:00 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-25 12:00:16 -0500
commit9cac1b4b4f1532fb2aeef54799285360656be5eb (patch)
treeb99c8b52894731f33a5bfe09dcd1042f6ab59f9e /libavcodec/qsvenc.c
parenteef9f06508354d1c7d5624c1c18997e7974288f1 (diff)
qsvenc: Add private option to replace coder_type
Missing from be00ec832c519427cd92218abac77dafdc1d5487.
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r--libavcodec/qsvenc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 9aa865dd40..453301c779 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -447,8 +447,14 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
if (avctx->codec_id != AV_CODEC_ID_HEVC) {
q->extco.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
q->extco.Header.BufferSz = sizeof(q->extco);
- q->extco.CAVLC = avctx->coder_type == FF_CODER_TYPE_VLC ?
- MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
+#if FF_API_CODER_TYPE
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (avctx->coder_type != 0)
+ q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
+ : MFX_CODINGOPTION_UNKNOWN;
if (q->rdo >= 0)
q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;