From 690a02b1c9132bfecc88068de757e6b0e5ef7b84 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 20 Sep 2005 16:18:23 +0000 Subject: [PATCH] fps patch by Haali git-svn-id: svn://svn.videolan.org/x264/trunk@295 df754926-b1dd-0310-bc7b-ec298dee348c --- x264.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x264.c b/x264.c index c648d263..bc30e30b 100644 --- a/x264.c +++ b/x264.c @@ -1128,7 +1128,7 @@ static int Encode( x264_param_t *param, cli_opt_t *opt ) if( p_read_frame( &pic, opt->hin, i_frame + opt->i_seek, param->i_width, param->i_height ) ) break; - pic.i_pts = i_frame * param->i_fps_den; + pic.i_pts = (int64_t)i_frame * param->i_fps_den; i_file += Encode_frame( h, opt->hout, &pic ); @@ -1801,8 +1801,7 @@ static int write_nalu_mkv( hnd_t handle, uint8_t *p_nalu, int i_size ) static int set_eop_mkv( hnd_t handle, x264_picture_t *p_picture ) { mkv_t *p_mkv = handle; - int64_t i_stamp = (int64_t)p_picture->i_pts * (int64_t)1000000000 / - p_mkv->fps_num; + int64_t i_stamp = (int64_t)(p_picture->i_pts * 1e9 / p_mkv->fps_num); p_mkv->b_writing_frame = 0; -- 2.47.3