Browse Source

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

Originally committed as revision 12999 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 18 years ago
parent
commit
169203c1d9
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      libavcodec/mpegaudiodec.c

+ 2
- 4
libavcodec/mpegaudiodec.c 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);


Loading…
Cancel
Save