]> git.videolan.org Git - x264.git/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)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 25 Nov 2008 23:27:27 +0000 (15:27 -0800)
encoder/ratecontrol.c

index cdc973ae895f5011e1df414aeac0a6cbb17159b2..3d3e894244166f9bcd131588a91297e63b666005 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",