[FFmpeg-cvslog] mpegaudio_parser: Don't ignore information from the first frame

Alexander Kojevnikov git at videolan.org
Fri Mar 8 00:09:19 CET 2013


ffmpeg | branch: master | Alexander Kojevnikov <alexander at kojevnikov.com> | Wed Mar  6 21:58:59 2013 -0800| [d30ee5ef59d365cf356694cc25b8099c97618a11] | committer: Michael Niedermayer

mpegaudio_parser: Don't ignore information from the first frame

Signed-off-by: Alexander Kojevnikov <alexander at kojevnikov.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d30ee5ef59d365cf356694cc25b8099c97618a11
---

 libavcodec/mpegaudio_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index bb4d75c..4081936 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -75,6 +75,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
                     if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
                         s->header_count= -3;
                     s->header= state;
+                    s->header_count++;
                     s->frame_size = ret-4;
 
                     if (s->header_count > 0) {
@@ -86,7 +87,6 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
                             avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count;
                         }
                     }
-                    s->header_count++;
                     break;
                 }
             }



More information about the ffmpeg-cvslog mailing list