changeset 9598:407470044819 libavcodec

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!
author michael
date Tue, 05 May 2009 13:46:50 +0000
parents b60289b3e29a
children 6409c6ba8040
files mpegaudio_parser.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudio_parser.c	Tue May 05 06:10:59 2009 +0000
+++ b/mpegaudio_parser.c	Tue May 05 13:46:50 2009 +0000
@@ -223,10 +223,8 @@
 
         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 @@
         //    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;