avidec: dont randomly skip packets for offseting the index
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 17 May 2013 20:03:14 +0000 (22:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 17 May 2013 20:16:10 +0000 (22:16 +0200)
Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avidec.c

index b80effc..f5c2345 100644 (file)
@@ -1022,9 +1022,9 @@ start_sync:
                || st->discard >= AVDISCARD_ALL){
                 if (!exit_early) {
                     ast->frame_offset += get_duration(ast, size);
+                    avio_skip(pb, size);
+                    goto start_sync;
                 }
-                avio_skip(pb, size);
-                goto start_sync;
             }
 
             if (d[2] == 'p' && d[3] == 'c' && size<=4*256+4) {