aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorZhao Zhili <quinkblack@foxmail.com>2022-01-10 18:18:44 +0800
committerMartin Storsjö <martin@martin.st>2022-01-10 12:32:21 +0200
commitf37e66b3937a914e16d89a9050f042ad89567245 (patch)
tree5b8a3ac88b2291a9220509707e8fa22eb4d5e849 /libavformat/movenc.c
parentecf09764dcfc4d90d2292d91f225bfd02211a17f (diff)
downloadffmpeg-f37e66b3937a914e16d89a9050f042ad89567245.tar.gz
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>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index ab33371296..4c868919ae 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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)