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)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 17 May 2013 20:51:37 +0000 (22:51 +0200)
Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c593f1b671b7725b8c36f92f7c0a23ccf8e7628)

libavformat/avidec.c

index 18e2d96..6513f3f 100644 (file)
@@ -1005,9 +1005,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) {