From dabba0c676389b73c7b324fc999da7076fae149e Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 15 Dec 2011 16:31:07 +0000 Subject: v410enc: fix output buffer size check The encoder clearly needs width * height * 4 bytes. Signed-off-by: Mans Rullgard --- libavcodec/v410enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/v410enc.c') diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c index d15fb7ab97..95b36c138e 100644 --- a/libavcodec/v410enc.c +++ b/libavcodec/v410enc.c @@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf, int i, j; int output_size = 0; - if (buf_size < avctx->width * avctx->height * 3) { + if (buf_size < avctx->width * avctx->height * 4) { av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n"); return AVERROR(ENOMEM); } -- cgit v1.2.3