[FFmpeg-cvslog] libvpxenc: only force CBR if a bitrate is set

Michael Niedermayer git at videolan.org
Fri Aug 17 22:03:32 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 17 17:11:24 2012 +0200| [1ee7a2955f3ebd49a34ab4b9880889c4e0b5e423] | committer: Michael Niedermayer

libvpxenc: only force CBR if a bitrate is set

Reviewed-by: James Zern <jzern at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 0b97907..b438301 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -266,7 +266,7 @@ static av_cold int vp8_init(AVCodecContext *avctx)
         enccfg.g_pass = VPX_RC_ONE_PASS;
 
     if (avctx->rc_min_rate == avctx->rc_max_rate &&
-        avctx->rc_min_rate == avctx->bit_rate)
+        avctx->rc_min_rate == avctx->bit_rate && avctx->bit_rate)
         enccfg.rc_end_usage = VPX_CBR;
     else if (ctx->crf)
         enccfg.rc_end_usage = VPX_CQ;



More information about the ffmpeg-cvslog mailing list