[FFmpeg-cvslog] avformat/movenc: fix DELAY_MOOV

Michael Niedermayer git at videolan.org
Sat Jan 3 17:57:22 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan  3 17:24:55 2015 +0100| [0daf60140bd07436e063c13501755fb4c8d2dfe3] | committer: Michael Niedermayer

avformat/movenc: fix DELAY_MOOV

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0daf60140bd07436e063c13501755fb4c8d2dfe3
---

 libavformat/movenc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 48e1445..b24ca22 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2407,10 +2407,11 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
 {
     int64_t pos = avio_tell(pb);
     int entry_backup = track->entry;
+    int chunk_backup = track->chunkCount;
     /* If we want to have an empty moov, but some samples already have been
      * buffered (delay_moov), pretend that no samples have been written yet. */
     if (mov->flags & FF_MOV_FLAG_EMPTY_MOOV)
-        track->entry = 0;
+        track->chunkCount = track->entry = 0;
 
     avio_wb32(pb, 0); /* size */
     ffio_wfourcc(pb, "trak");
@@ -2446,6 +2447,7 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
     }
     mov_write_track_udta_tag(pb, mov, st);
     track->entry = entry_backup;
+    track->chunkCount = chunk_backup;
     return update_size(pb, pos);
 }
 



More information about the ffmpeg-cvslog mailing list