also return AVERROR(EINVAL) instead of -1.
---
libavcodec/ra288.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 4c206de..6606e75 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -177,8 +177,10 @@ static int ra288_decode_frame(AVCodecContext * avctx, void
*data,
}
out_size = 32 * 5 * 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);
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel