mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/movenc: fix duration in mdhd box
mvhd and tkhd present the post-editlist duration, while mdhd should
have the pre-editlist duration. Regression since c2424b1f3
.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
ecf09764dc
commit
f37e66b393
@ -2960,7 +2960,7 @@ static int64_t calc_pts_duration(MOVMuxContext *mov, MOVTrack *track)
|
||||
static int mov_write_mdhd_tag(AVIOContext *pb, MOVMuxContext *mov,
|
||||
MOVTrack *track)
|
||||
{
|
||||
int64_t duration = calc_pts_duration(mov, track);
|
||||
int64_t duration = calc_samples_pts_duration(mov, track);
|
||||
int version = duration < INT32_MAX ? 0 : 1;
|
||||
|
||||
if (track->mode == MODE_ISM)
|
||||
|
@ -1,4 +1,4 @@
|
||||
452d91e7c6889b787717fef25b6fce43 *tests/data/fate/copy-trac3074.mp4
|
||||
36fcc0a62695bcf93068fcfe68283ee9 *tests/data/fate/copy-trac3074.mp4
|
||||
334016 tests/data/fate/copy-trac3074.mp4
|
||||
#tb 0: 1/48000
|
||||
#media_type 0: audio
|
||||
|
@ -1,4 +1,4 @@
|
||||
4e92f776010bd7a727c11bf8c34cde1e *tests/data/fate/mov-cover-image.mp4
|
||||
54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
|
||||
1011919 tests/data/fate/mov-cover-image.mp4
|
||||
#extradata 0: 2, 0x00340022
|
||||
#tb 0: 1/44100
|
||||
|
@ -1,4 +1,4 @@
|
||||
3c4432fe59ffd9f2ed6ba4b122cea935 *tests/data/fate/mov-mp4-disposition-mpegts-remux.mp4
|
||||
adb3b95c07a5f3e0c86641dd62f01dae *tests/data/fate/mov-mp4-disposition-mpegts-remux.mp4
|
||||
5709 tests/data/fate/mov-mp4-disposition-mpegts-remux.mp4
|
||||
#tb 0: 1/48000
|
||||
#media_type 0: audio
|
||||
|
@ -7,7 +7,7 @@ write_data len 36, time nopts, type header atom ftyp
|
||||
write_data len 2761, time nopts, type header atom -
|
||||
write_data len 908, time 966667, type sync atom moof
|
||||
write_data len 110, time nopts, type trailer atom -
|
||||
caf0876986b5f033efc0958c338289cc 3815 non-empty-moov-elst
|
||||
9d260d424e9de4626163fd25ccce5bab 3815 non-empty-moov-elst
|
||||
write_data len 36, time nopts, type header atom ftyp
|
||||
write_data len 2669, time nopts, type header atom -
|
||||
write_data len 908, time 1000000, type sync atom moof
|
||||
|
Loading…
Reference in New Issue
Block a user