1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

return error if buf_size is too small

Originally committed as revision 12981 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-04-26 12:39:45 +00:00
parent dfcd6d91fe
commit a82dcdffb2

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;