[FFmpeg-devel] [PATCH 1/2] movenc: fix edit list for the case of negative pts.

Michael Niedermayer michaelni at gmx.at
Sat Sep 29 07:08:15 CEST 2012


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/movenc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 4b0a547..ded2859 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1672,6 +1672,10 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track)
             avio_wb32(pb, -1);
         }
         avio_wb32(pb, 0x00010000);
+    } else {
+        av_assert0(track->cluster[0].dts <= 0);
+        start_ct  = -track->cluster[0].dts;
+        duration += delay;
     }
 
     /* duration */
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list