Commit a82dcdff authored by Baptiste Coudurier's avatar Baptiste Coudurier

return error if buf_size is too small

Originally committed as revision 12981 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent dfcd6d91
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment