Commit c3307b7b authored by aymeric's avatar aymeric
Browse files

fix formula to avoid division by 0

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@578 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 4795e241
......@@ -201,7 +201,7 @@ static void prepare(EncState *s){
avcodec_get_context_defaults(c);
/* put codec parameters */
c->bit_rate=(float)s->maxbr*0.7;
c->bit_rate_tolerance=(float)c->bit_rate/(s->fps-1);
c->bit_rate_tolerance=s->fps!=1?(float)c->bit_rate/(s->fps-1):c->bit_rate;
if (s->codec!=CODEC_ID_SNOW && s->maxbr<256000){
/*snow does not like 1st pass rate control*/
......
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