Commit 88fe9f44 authored by Ilkka Ollakka's avatar Ilkka Ollakka Committed by Jean-Baptiste Kempf

avcodec: only set min/maxrate if rc-buffer-size is set

(cherry picked from commit 50a0ceae0ffa535512c5fd8e0952f277b1732458)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9554d1a8
......@@ -590,8 +590,11 @@ int OpenEncoder( vlc_object_t *p_this )
else
{
p_context->rc_qsquish = 1.0;
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment