Do not use pkt->size when it is potentially uninitialized.
authorThierry Foucu <tfoucu@gmail.com>
Tue, 4 May 2010 17:17:16 +0000 (17:17 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Tue, 4 May 2010 17:17:16 +0000 (17:17 +0000)
Patch by Thierry Foucu, tfoucu gmail

Originally committed as revision 23017 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avidec.c

index 34583c5..e866a93 100644 (file)
@@ -887,7 +887,7 @@ resync:
             if(   (st->discard >= AVDISCARD_DEFAULT && size==0)
                /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
                || st->discard >= AVDISCARD_ALL){
-                if(ast->sample_size) ast->frame_offset += pkt->size;
+                if(ast->sample_size) ast->frame_offset += size;
                 else                 ast->frame_offset++;
                 url_fskip(pb, size);
                 goto resync;