changeset 6705:d5515254fbbd libavcodec

break if error in header so it can output already decoded frames
author bcoudurier
date Sat, 26 Apr 2008 14:41:29 +0000
parents 2f439a593e56
children 2cb901474f6f
files mpegaudiodec.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Sat Apr 26 14:36:34 2008 +0000
+++ b/mpegaudiodec.c	Sat Apr 26 14:41:29 2008 +0000
@@ -2591,10 +2591,8 @@
 
         header = (AV_RB32(buf) & 0x000fffff) | s->syncword; // patch header
 
-        if (ff_mpa_check_header(header) < 0) { // Bad header, discard block
-            *data_size = 0;
-            return buf_size;
-        }
+        if (ff_mpa_check_header(header) < 0) // Bad header, discard block
+            break;
 
         ff_mpegaudio_decode_header(m, header);
         out_size += mp_decode_frame(m, outptr, buf, fsize);