Browse Source

return error if buf_size is too small

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

+ 3
- 4
libavcodec/mpegaudiodec.c View File

@@ -2570,11 +2570,10 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,

len = buf_size;

*data_size = 0;
// Discard too short frames
if (buf_size < HEADER_SIZE) {
*data_size = 0;
return buf_size;
}
if (buf_size < HEADER_SIZE)
return -1;

// If only one decoder interleave is not needed
outptr = s->frames == 1 ? out_samples : decoded_buf;


Loading…
Cancel
Save