diff options
author | James Almer <jamrial@gmail.com> | 2024-11-20 14:40:29 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-11-22 20:50:05 -0300 |
commit | b328bf8f7ed6f7794bc69b8a6304390527a6216a (patch) | |
tree | da9c921fdb294cf28b45f2333bb60c577ea3735e /libavformat/movenc.c | |
parent | 0dceced45c52acc773e690a7aa7ff2e3fb8c560b (diff) | |
download | ffmpeg-b328bf8f7ed6f7794bc69b8a6304390527a6216a.tar.gz |
avformat/mov: rename MOVCtts.duration to offset
The value is a timestamp offset, not a duration.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0595c4ce82..1488c173a7 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3007,13 +3007,13 @@ static int mov_write_ctts_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra if (!ctts_entries) return AVERROR(ENOMEM); ctts_entries[0].count = 1; - ctts_entries[0].duration = track->cluster[0].cts; + ctts_entries[0].offset = track->cluster[0].cts; for (i = 1; i < track->entry; i++) { - if (track->cluster[i].cts == ctts_entries[entries].duration) { + if (track->cluster[i].cts == ctts_entries[entries].offset) { ctts_entries[entries].count++; /* compress */ } else { entries++; - ctts_entries[entries].duration = track->cluster[i].cts; + ctts_entries[entries].offset = track->cluster[i].cts; ctts_entries[entries].count = 1; } } @@ -3029,7 +3029,7 @@ static int mov_write_ctts_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra avio_wb32(pb, entries); /* entry count */ for (i = 0; i < entries; i++) { avio_wb32(pb, ctts_entries[i].count); - avio_wb32(pb, ctts_entries[i].duration); + avio_wb32(pb, ctts_entries[i].offset); } av_free(ctts_entries); return atom_size; |