From 0e58d0373bb8586f78eb1b95221b347123689e3c Mon Sep 17 00:00:00 2001 From: BugMaster Date: Tue, 25 Nov 2008 15:11:24 -0800 Subject: [PATCH] Fix rare warning messages in ratecontrol due to r1020 --- encoder/ratecontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 1f606b94..c1038aae 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", -- 2.40.0