Commit caa1b28b authored by James Berry's avatar James Berry

bug fix active_worst_quality set below active_best_quality

fixed a bug where active_worst_quality could be set
below active_best_quality which could result in an
infinite loop.

Change-Id: I93c229c3bc5bff2a82b4c33f41f8acf4dd194039
parent dba79821
......@@ -3427,15 +3427,15 @@ static void encode_frame_to_data_rate
buff_lvl_step = (cpi->oxcf.maximum_buffer_size - cpi->oxcf.optimal_buffer_level) / Adjustment;
if (buff_lvl_step)
{
Adjustment = (cpi->buffer_level - cpi->oxcf.optimal_buffer_level) / buff_lvl_step;
cpi->active_worst_quality -= Adjustment;
}
}
else
{
cpi->active_worst_quality -= Adjustment;
else
Adjustment = 0;
}
cpi->active_worst_quality -= Adjustment;
if(cpi->active_worst_quality < cpi->active_best_quality)
cpi->active_worst_quality = cpi->active_best_quality;
}
}
......
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