From: Yusuke Nakamura Date: Sat, 6 Mar 2010 10:25:30 +0000 (+0900) Subject: Fix slightly wrong mp4 duration. X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=d84a1a95f4db132a374d550c98fa85e00075e7a8;p=x264.git Fix slightly wrong mp4 duration. --- diff --git a/output/mp4.c b/output/mp4.c index 548868aa..dfe6943f 100644 --- a/output/mp4.c +++ b/output/mp4.c @@ -122,7 +122,7 @@ static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest * So, if mdhd duration is equal to the last DTS or less, we give the last composition time delta to the last sample duration. * And then, the mdhd duration is updated, but it time-wise doesn't give the actual duration. * The tkhd duration is the actual track duration. */ - uint64_t mdhd_duration = (2 * largest_pts - second_largest_pts - p_mp4->i_delay_time) * p_mp4->i_time_inc; + uint64_t mdhd_duration = (2 * largest_pts - second_largest_pts) * p_mp4->i_time_inc; if( mdhd_duration != gf_isom_get_media_duration( p_mp4->p_file, p_mp4->i_track ) ) { uint64_t last_dts = gf_isom_get_sample_dts( p_mp4->p_file, p_mp4->i_track, p_mp4->i_numframe );