mpegaudio_parser: reset state to prevent it to be random
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Sep 2012 03:55:11 +0000 (05:55 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Sep 2012 23:08:24 +0000 (01:08 +0200)
Fixes Ticket1718

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

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

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

index ec7e882..283bf04 100644 (file)
@@ -53,6 +53,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
             int inc= FFMIN(buf_size - i, s->frame_size);
             i += inc;
             s->frame_size -= inc;
+            state = 0;
 
             if(!s->frame_size){
                 next= i;