From: BugMaster Date: Tue, 25 Nov 2008 23:11:24 +0000 (-0800) Subject: Fix rare warning messages in ratecontrol due to r1020 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=0fe9b85f393e00b79c37d8c81aeae2a2f3d41290;p=x264.git Fix rare warning messages in ratecontrol due to r1020 --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index cdc973ae..3d3e8942 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",