Browse Source

movenc: Place the sidx index after the initial moov/mdat pair

For fragmented files with non-empty moov, with a fragment index
(sidx), place the index after the initial moov/mdat pair.

Previously, for this pathological case, the index was written
at the start of the file.

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.8
Martin Storsjö 10 years ago
parent
commit
5f200bbf98
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/movenc.c

+ 3
- 0
libavformat/movenc.c View File

@@ -3242,6 +3242,9 @@ static int mov_flush_fragment(AVFormatContext *s)
avio_write(s->pb, buf, buf_size);
av_free(buf);

if (mov->flags & FF_MOV_FLAG_FASTSTART)
mov->reserved_header_pos = avio_tell(s->pb);

mov->moov_written = 1;
mov->mdat_size = 0;
for (i = 0; i < mov->nb_streams; i++) {


Loading…
Cancel
Save