[x264-devel] commit: Fix VBV warning broken in r915 (Loren Merritt )

git version control git at videolan.org
Wed May 27 02:34:12 CEST 2009


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Mon May 25 19:16:05 2009 -0400| [ea224ee82377496cd356999b5deadd03a2001514] | committer: Jason Garrett-Glaser 

Fix VBV warning broken in r915
x264 will now correctly warn about maxrate specified without bufsize even when a level is not set.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ea224ee82377496cd356999b5deadd03a2001514
---

 encoder/encoder.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index 76651c4..ab9dac0 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -523,6 +523,7 @@ static int x264_validate_parameters( x264_t *h )
         const x264_level_t *l = x264_levels;
         if( h->param.i_level_idc < 0 )
         {
+            int maxrate_bak = h->param.rc.i_vbv_max_bitrate;
             if( h->param.rc.i_rc_method == X264_RC_ABR && h->param.rc.i_vbv_buffer_size <= 0 )
                 h->param.rc.i_vbv_max_bitrate = h->param.rc.i_bitrate * 2;
             h->sps = h->sps_array;
@@ -531,6 +532,7 @@ static int x264_validate_parameters( x264_t *h )
                 while( l[1].level_idc && x264_validate_levels( h, 0 ) && l++ );
             if( h->param.rc.i_vbv_buffer_size <= 0 )
                 h->param.rc.i_vbv_max_bitrate = 0;
+            h->param.rc.i_vbv_max_bitrate = maxrate_bak;
         }
         else
         {



More information about the x264-devel mailing list