Commit 8f8f5ae9 authored by Justin Ruggles's avatar Justin Ruggles

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

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