From 0249144a1c5ca6054e4b7374b5dd24bcbe435239 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 15 Dec 2011 16:06:12 +0000 Subject: v410enc: include correct headers This file does not use anything from put_bits.h but needs intreadwrite.h. 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 1e600c35b6..d15fb7ab97 100644 --- a/libavcodec/v410enc.c +++ b/libavcodec/v410enc.c @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/intreadwrite.h" #include "avcodec.h" -#include "put_bits.h" static av_cold int v410_encode_init(AVCodecContext *avctx) { -- cgit v1.2.1 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.1