From 986c1c483befa717ee20710e21f5a5c014666c6e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:38 +0000 Subject: v210enc: use stride as it is already calculated Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/v210enc.c') diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 00a89025d2..17b3a9a6e2 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -62,7 +62,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, uint8_t *p = buf; uint8_t *pdst = buf; - if (buf_size < aligned_width * avctx->height * 8 / 3) { + if (buf_size < avctx->height * stride) { av_log(avctx, AV_LOG_ERROR, "output buffer too small\n"); return AVERROR(ENOMEM); } -- cgit v1.2.3