Commit 690a02b1 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

fps patch by Haali

git-svn-id: svn://svn.videolan.org/x264/trunk@295 df754926-b1dd-0310-bc7b-ec298dee348c
parent 8a5de70e
...@@ -1128,7 +1128,7 @@ static int Encode( x264_param_t *param, cli_opt_t *opt ) ...@@ -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 ) ) if( p_read_frame( &pic, opt->hin, i_frame + opt->i_seek, param->i_width, param->i_height ) )
break; 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 ); 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 ) ...@@ -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 ) static int set_eop_mkv( hnd_t handle, x264_picture_t *p_picture )
{ {
mkv_t *p_mkv = handle; mkv_t *p_mkv = handle;
int64_t i_stamp = (int64_t)p_picture->i_pts * (int64_t)1000000000 / int64_t i_stamp = (int64_t)(p_picture->i_pts * 1e9 / p_mkv->fps_num);
p_mkv->fps_num;
p_mkv->b_writing_frame = 0; p_mkv->b_writing_frame = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment