[FFmpeg-cvslog] avcodec/nvenc: Fix forcing constqp rc mode

Timo Rothenpieler git at videolan.org
Tue May 31 17:04:53 CEST 2016


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue May 31 16:53:38 2016 +0200| [1330a0f31f373f3b9f1ea53d48b94edc47759b76] | committer: Timo Rothenpieler

avcodec/nvenc: Fix forcing constqp rc mode

The CONSTQP enum value is 0, so this check failed for it.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1330a0f31f373f3b9f1ea53d48b94edc47759b76
---

 libavcodec/nvenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index e8b57e4..14ed0d2 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -651,7 +651,7 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
 
     if (ctx->flags & NVENC_LOSSLESS) {
         set_lossless(avctx);
-    } else if (ctx->rc > 0) {
+    } else if (ctx->rc >= 0) {
         nvenc_override_rate_control(avctx);
     } else {
         ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_VBR;



More information about the ffmpeg-cvslog mailing list