Commit 50a0ceae authored by Ilkka Ollakka's avatar Ilkka Ollakka
Browse files

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

parent f41ea012
......@@ -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
......
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