提交 cadd4d33 编写于 作者: J Justin Ruggles

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

also return AVERROR(EINVAL) instead of -1.
上级 80bdf7e0
......@@ -72,8 +72,10 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
GetBitContext gb;
out_size = NBLOCKS * BLOCKSIZE * 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);
}
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册