shithub: libvpx

Download patch

ref: aa6afc016489856f9f18bb98f0259c4e51584626
parent: c954a33b052da3ff3a13effbccb546999adf17b5
parent: b615a6d47f59c945de3da8a592b2f63bc094ec3b
author: Adrian Grange <agrange@google.com>
date: Tue Nov 8 03:00:31 EST 2011

Merge "Third set of checks of buffer level against maximum buffer size"

--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -990,6 +990,8 @@
         {
             // 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;
         }
         else