From 14fd34d73bb0bcb227b62506fb51d63751c9b190 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 29 Sep 2012 06:31:18 +0200 Subject: [PATCH] movenc: fix edit list for the case of negative pts. Signed-off-by: Michael Niedermayer --- libavformat/movenc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 4b0a547e70..ded2859719 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 */