[FFmpeg-cvslog] avcodec/libx264: fix "bitrate reconfiguration"
Michael Niedermayer
git at videolan.org
Thu Jun 12 01:21:09 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 12 01:03:46 2014 +0200| [3a1c8951bc886e8af30e09dc0e20491f6f5c3937] | committer: Michael Niedermayer
avcodec/libx264: fix "bitrate reconfiguration"
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a1c8951bc886e8af30e09dc0e20491f6f5c3937
---
libavcodec/libx264.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 0b304cb..5d1e203 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -208,18 +208,20 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
}
if (x4->params.rc.i_rc_method == X264_RC_CRF &&
+ x4->crf >= 0 &&
x4->params.rc.f_rf_constant != x4->crf) {
x4->params.rc.f_rf_constant = x4->crf;
x264_encoder_reconfig(x4->enc, &x4->params);
}
if (x4->params.rc.i_rc_method == X264_RC_CQP &&
+ x4->cqp >= 0 &&
x4->params.rc.i_qp_constant != x4->cqp) {
x4->params.rc.i_qp_constant = x4->cqp;
x264_encoder_reconfig(x4->enc, &x4->params);
}
- if (x4->crf_max &&
+ if (x4->crf_max >= 0 &&
x4->params.rc.f_rf_constant_max != x4->crf_max) {
x4->params.rc.f_rf_constant_max = x4->crf_max;
x264_encoder_reconfig(x4->enc, &x4->params);
More information about the ffmpeg-cvslog
mailing list