[FFmpeg-cvslog] r18741 - trunk/libavcodec/mpegaudio_parser.c

michael subversion
Tue May 5 15:46:51 CEST 2009


Author: michael
Date: Tue May  5 15:46:50 2009
New Revision: 18741

Log:
Do not discard mp3 frames in the parser after a broken frame.
Fixes issue1044.
This may cause regressions with broken streams, if you find any, please report!

Modified:
   trunk/libavcodec/mpegaudio_parser.c

Modified: trunk/libavcodec/mpegaudio_parser.c
==============================================================================
--- trunk/libavcodec/mpegaudio_parser.c	Tue May  5 08:10:59 2009	(r18740)
+++ trunk/libavcodec/mpegaudio_parser.c	Tue May  5 15:46:50 2009	(r18741)
@@ -223,10 +223,8 @@ static int mpegaudio_parse(AVCodecParser
 
         if(s->frame_size > 0 && buf_ptr - buf == s->inbuf_ptr - s->inbuf
            && buf_size + buf_ptr - buf >= s->frame_size){
-            if(s->header_count > 0){
                 *poutbuf = buf;
                 *poutbuf_size = s->frame_size;
-            }
             buf_ptr = buf + s->frame_size;
             s->inbuf_ptr = s->inbuf;
             s->frame_size = 0;
@@ -236,10 +234,8 @@ static int mpegaudio_parse(AVCodecParser
         //    next_data:
         if (s->frame_size > 0 &&
             (s->inbuf_ptr - s->inbuf) >= s->frame_size) {
-            if(s->header_count > 0){
                 *poutbuf = s->inbuf;
                 *poutbuf_size = s->inbuf_ptr - s->inbuf;
-            }
             s->inbuf_ptr = s->inbuf;
             s->frame_size = 0;
             break;



More information about the ffmpeg-cvslog mailing list