[FFmpeg-cvslog] v210enc: use stride as it is already calculated
Paul B Mahol
git at videolan.org
Tue Feb 7 02:02:59 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb 5 21:14:38 2012 +0000| [986c1c483befa717ee20710e21f5a5c014666c6e] | committer: Anton Khirnov
v210enc: use stride as it is already calculated
Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=986c1c483befa717ee20710e21f5a5c014666c6e
---
libavcodec/v210enc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 00a8902..17b3a9a 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);
}
More information about the ffmpeg-cvslog
mailing list