mpegaudio_parser: be less picky about the start position
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jun 2011 00:49:20 +0000 (02:49 +0200)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 3 Mar 2012 22:03:26 +0000 (17:03 -0500)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
libavcodec/mpegaudio_parser.c

index 5fd9037..3748f5d 100644 (file)
@@ -66,7 +66,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
 
                 ret = avpriv_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate);
                 if (ret < 4) {
-                    s->header_count= -2;
+                    if (i > 4)
+                        s->header_count = -2;
                 } else {
                     if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
                         s->header_count= -3;