Commit b615a6d4 authored by Adrian Grange's avatar Adrian Grange
Browse files

Third set of checks of buffer level against maximum buffer size

Additional check of buffer level to ensure it doesn't exceed the
maximum buffer size.

Change-Id: I1ba4f8b09bbec89646885040ff47470196af521e
parent fa25a31e
......@@ -990,6 +990,8 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
// Update the buffer level variable.
cpi->bits_off_target += cpi->av_per_frame_bandwidth;
if (cpi->bits_off_target > cpi->oxcf.maximum_buffer_size)
cpi->bits_off_target = cpi->oxcf.maximum_buffer_size;
cpi->buffer_level = cpi->bits_off_target;
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