1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

ra288: log an error message when output buffer is too small.

also return AVERROR(EINVAL) instead of -1.
This commit is contained in:
Justin Ruggles
2011-09-14 14:46:50 -04:00
parent fa6be04bf7
commit 8f8f5ae991

View File

@@ -181,8 +181,10 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
out_size = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME * out_size = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME *
av_get_bytes_per_sample(avctx->sample_fmt); av_get_bytes_per_sample(avctx->sample_fmt);
if (*data_size < out_size) if (*data_size < out_size) {
return -1; av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n");
return AVERROR(EINVAL);
}
init_get_bits(&gb, buf, avctx->block_align * 8); init_get_bits(&gb, buf, avctx->block_align * 8);