]> granicus.if.org Git - libx264/commitdiff
Fix rare warning messages in ratecontrol due to r1020
authorBugMaster <BugMaster@narod.ru>
Tue, 25 Nov 2008 23:11:24 +0000 (15:11 -0800)
committerFiona Glaser <fiona@x264.com>
Tue, 25 Nov 2008 23:27:27 +0000 (15:27 -0800)
encoder/ratecontrol.c

index 1f606b948c86e253da4e6e6670e4b31f873e3df5..c1038aae3881b22f93d788b82709fbfb9d9ca8e4 100644 (file)
@@ -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",