diff options
author | Martin Storsjö <martin@martin.st> | 2015-08-09 22:40:39 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-08-10 09:46:14 +0300 |
commit | 5f200bbf98efe50f63d0515b115d2ba8dae297bc (patch) | |
tree | c4d10daab2d82a555cdef2e543de7a14a29012d6 | |
parent | 83f254e65f938657a4dbec711e4c94252a72daf9 (diff) | |
download | ffmpeg-5f200bbf98efe50f63d0515b115d2ba8dae297bc.tar.gz |
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>
-rw-r--r-- | libavformat/movenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index feb6a8480b..bb2504fa5f 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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++) { |