From ed0467756f5a842249d86fb9622006f3939c72a2 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Fri, 20 Nov 2009 08:04:28 -0800 Subject: [PATCH] Only print weightp stats if there were P-frames --- encoder/encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder/encoder.c b/encoder/encoder.c index 0b4117e7..8523d152 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -2566,7 +2566,7 @@ void x264_encoder_close ( x264_t *h ) fixed_pred_modes[i][8] * 100.0 / sum_pred_modes[i] ); } - if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_SMART ) + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_SMART && h->stat.i_frame_count[SLICE_TYPE_P] > 0 ) x264_log( h, X264_LOG_INFO, "Weighted P-Frames: Y:%.1f%%\n", h->stat.i_wpred[0] * 100.0 / h->stat.i_frame_count[SLICE_TYPE_P] ); -- 2.47.3