break if error in header so it can output already decoded frames

Originally committed as revision 12999 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-04-26 14:41:29 +00:00
parent 41b8800f88
commit 169203c1d9
1 changed files with 2 additions and 4 deletions

View File

@ -2591,10 +2591,8 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,
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);