History

avformat/movenc: don't disable edit lists when writing CMAF output

They are needed for audio tracks with priming samples, where negative CTS offsets can't be used. Fixes ticket #11031.

James Almer committed 2 years ago

Commit ecc7d5d1 parent 865c73c1 file · +0 −8Browse files

Unified · Split

libavformat/movenc.c+0−8
@@ -7675,19 +7675,11 @@ static int mov_init(AVFormatContext *s) · 7674 unmodified lines
76757675 s->avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO)
76767676 mov->use_editlist = 0;
76777677 }
7678− if (mov->flags & FF_MOV_FLAG_CMAF) {
7679− // CMAF Track requires negative cts offsets without edit lists
7680− mov->use_editlist = 0;
7681− }
76827678 }
76837679 if (mov->flags & FF_MOV_FLAG_EMPTY_MOOV &&
76847680 !(mov->flags & FF_MOV_FLAG_DELAY_MOOV) && mov->use_editlist)
76857681 av_log(s, AV_LOG_WARNING, "No meaningful edit list will be written when using empty_moov without delay_moov\n");
76867682
7687− if (mov->flags & FF_MOV_FLAG_CMAF && mov->use_editlist) {
7688− av_log(s, AV_LOG_WARNING, "Edit list enabled; Assuming writing CMAF Track File\n");
7689− mov->flags &= ~FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS;
7690− }
76917683 if (!mov->use_editlist && s->avoid_negative_ts == AVFMT_AVOID_NEG_TS_AUTO &&
76927684 !(mov->flags & FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS))
76937685 s->avoid_negative_ts = AVFMT_AVOID_NEG_TS_MAKE_ZERO;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t