[vlc-commits] avcodec: only set min/maxrate if rc-buffer-size is set
Ilkka Ollakka
git at videolan.org
Wed Oct 24 23:00:21 CEST 2012
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Oct 24 23:58:49 2012 +0300| [50a0ceae0ffa535512c5fd8e0952f277b1732458] | committer: Ilkka Ollakka
avcodec: only set min/maxrate if rc-buffer-size is set
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50a0ceae0ffa535512c5fd8e0952f277b1732458
---
modules/codec/avcodec/encoder.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 73f5dd3..1248741 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -573,8 +573,11 @@ int OpenEncoder( vlc_object_t *p_this )
else
{
p_context->rc_qsquish = 1.0;
- p_context->rc_max_rate = p_enc->fmt_out.i_bitrate;
- p_context->rc_min_rate = p_enc->fmt_out.i_bitrate;
+ if( p_sys->i_rc_buffer_size )
+ {
+ p_context->rc_max_rate = p_enc->fmt_out.i_bitrate;
+ p_context->rc_min_rate = p_enc->fmt_out.i_bitrate;
+ }
p_context->rc_buffer_size = p_sys->i_rc_buffer_size;
/* This is from ffmpeg's ffmpeg.c : */
p_context->rc_initial_buffer_occupancy
More information about the vlc-commits
mailing list