From 9cac1b4b4f1532fb2aeef54799285360656be5eb Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 13 Jan 2016 15:27:00 -0500 Subject: qsvenc: Add private option to replace coder_type Missing from be00ec832c519427cd92218abac77dafdc1d5487. --- libavcodec/qsvenc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libavcodec/qsvenc.c') 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; -- cgit v1.2.3