summaryrefslogtreecommitdiff
path: root/libavcodec/v210enc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-02-05 21:14:38 +0000
committerAnton Khirnov <anton@khirnov.net>2012-02-06 08:00:23 +0100
commit986c1c483befa717ee20710e21f5a5c014666c6e (patch)
tree7491d4e780de491239cc801d0405d4c1f9f9b593 /libavcodec/v210enc.c
parent7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7 (diff)
v210enc: use stride as it is already calculated
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/v210enc.c')
-rw-r--r--libavcodec/v210enc.c2
1 files changed, 1 insertions, 1 deletions
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);
}