History

avformat/movenc: Fix editlist with hybrid_fragmented

The segment_duration must not be set to zero when writing the moov atom for the second time. This is related to edit lists in standard MP4 files.

Zhao Zhili committed 1 year ago

Commit 92007131 parent 98c28111 file · +7 −2Browse files

Unified · Split

libavformat/movenc.c+7−2
@@ -4036,8 +4036,13 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov, · 4035 unmodified lines
4036 /* For fragmented files, we don't know the full length yet. Setting4036 /* For fragmented files, we don't know the full length yet. Setting
4037 * duration to 0 allows us to only specify the offset, including4037 * duration to 0 allows us to only specify the offset, including
4038 * the rest of the content (from all future fragments) without specifying4038 * the rest of the content (from all future fragments) without specifying
4039 * an explicit duration. */4039 * an explicit duration.
4040 if (mov->flags & FF_MOV_FLAG_FRAGMENT)4040 *
4041 * For hybrid_fragmented during mov_write_trailer (mov->moov_written != 0),
4042 * don't reset duration to zero.
4043 */
4044 if (mov->flags & FF_MOV_FLAG_FRAGMENT &&
4045 !(mov->flags & FF_MOV_FLAG_HYBRID_FRAGMENTED && mov->moov_written))
4041 duration = 0;4046 duration = 0;
4042 4047
4043 /* duration */4048 /* duration */

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