Fix issue2246
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Mar 2011 16:03:09 +0000 (17:03 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 Apr 2011 14:40:12 +0000 (16:40 +0200)
ignore last ctts duration
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index 60dbbfc..c08b07e 100644 (file)
@@ -1499,7 +1499,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
         sc->ctts_data[i].count   = count;
         sc->ctts_data[i].duration= duration;
-        if (duration < 0)
+        if (duration < 0 && i+1<entries)
             sc->dts_shift = FFMAX(sc->dts_shift, -duration);
     }