]> git.sesse.net Git - x264/commitdiff
Fix slightly wrong mp4 duration.
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Sat, 6 Mar 2010 10:25:30 +0000 (19:25 +0900)
committerFiona Glaser <fiona@x264.com>
Sat, 27 Mar 2010 19:47:10 +0000 (12:47 -0700)
output/mp4.c

index 548868aae3a3606d889fa09d15c70e990a1990c8..dfe6943f9a213ff74192c6f339bddf3868bbe3a7 100644 (file)
@@ -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 );