[x264-devel] commit: Fix printing of bitrate when timestamps aren't available ( Loren Merritt )

git at videolan.org git at videolan.org
Sat Apr 24 00:40:08 CEST 2010


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Tue Apr 20 09:17:18 2010 +0000| [e37a4907a51c16ebe16cbdffcd87a5d8fc3c342c] | committer: Jason Garrett-Glaser 

Fix printing of bitrate when timestamps aren't available
Doesn't affect x264cli, but was broken in some other apps in CFR mode.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e37a4907a51c16ebe16cbdffcd87a5d8fc3c342c
---

 encoder/encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index f641f63..3370eb4 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -2913,7 +2913,7 @@ void    x264_encoder_close  ( x264_t *h )
         float fps = (float) h->param.i_fps_num / h->param.i_fps_den;
         float f_bitrate;
         /* duration algorithm fails with one frame */
-        if( i_count == 1 )
+        if( !h->param.b_vfr_input || i_count == 1 )
             f_bitrate = fps * SUM3(h->stat.i_frame_size) / i_count / 125;
         else
         {



More information about the x264-devel mailing list