From 677c61b8fe0751df9f7557ae66443336538cef91 Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Wed, 24 Jun 2026 00:23:15 +0200 Subject: [PATCH] avcodec/nvenc: reject deprecated global_quality instead of -qp --- libavcodec/nvenc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 5f324032f6..ff2b26c3bc 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -989,11 +989,10 @@ static av_cold int nvenc_setup_rate_control(AVCodecContext *avctx) { NvencContext *ctx = avctx->priv_data; - if (avctx->global_quality > 0) - av_log(avctx, AV_LOG_WARNING, "Using global_quality with nvenc is deprecated. Use qp instead.\n"); - - if (ctx->cqp < 0 && avctx->global_quality > 0) - ctx->cqp = avctx->global_quality; + if (avctx->global_quality > 0) { + av_log(avctx, AV_LOG_ERROR, "Using global_quality with nvenc is not supported. Use qp instead.\n"); + return AVERROR(EINVAL); + } if (avctx->bit_rate > 0) { ctx->encode_config.rcParams.averageBitRate = avctx->bit_rate;