[x264-devel] commit: Fix rare warning messages in ratecontrol due to r1020 (BugMaster )

git version control git at videolan.org
Wed Nov 26 00:28:02 CET 2008


x264 | branch: master | BugMaster <BugMaster at narod.ru> | Tue Nov 25 15:11:24 2008 -0800| [0fe9b85f393e00b79c37d8c81aeae2a2f3d41290] | committer: Jason Garrett-Glaser 

Fix rare warning messages in ratecontrol due to r1020

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

 encoder/ratecontrol.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index cdc973a..3d3e894 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -440,7 +440,7 @@ int x264_ratecontrol_new( x264_t *h )
             x264_log( h, X264_LOG_WARNING, "2nd pass has fewer frames than 1st pass (%d vs %d)\n",
                       h->param.i_frame_total, rc->num_entries );
         }
-        if( h->param.i_frame_total > rc->num_entries + h->param.i_bframe )
+        if( h->param.i_frame_total > rc->num_entries )
         {
             x264_log( h, X264_LOG_ERROR, "2nd pass has more frames than 1st pass (%d vs %d)\n",
                       h->param.i_frame_total, rc->num_entries );
@@ -462,7 +462,7 @@ int x264_ratecontrol_new( x264_t *h )
 
         /* read stats */
         p = stats_in;
-        for(i=0; i < rc->num_entries - h->param.i_bframe; i++)
+        for(i=0; i < rc->num_entries; i++)
         {
             ratecontrol_entry_t *rce;
             int frame_number;
@@ -691,7 +691,7 @@ void x264_ratecontrol_delete( x264_t *h )
     if( rc->p_stat_file_out )
     {
         fclose( rc->p_stat_file_out );
-        if( h->i_frame >= rc->num_entries - h->param.i_bframe )
+        if( h->i_frame >= rc->num_entries )
             if( rename( rc->psz_stat_file_tmpname, h->param.rc.psz_stat_out ) != 0 )
             {
                 x264_log( h, X264_LOG_ERROR, "failed to rename \"%s\" to \"%s\"\n",



More information about the x264-devel mailing list