From 44602899110061164476496fb48f06c40fe06132 Mon Sep 17 00:00:00 2001 From: Roberto Togni Date: Sun, 27 Jun 2004 11:06:30 +0000 Subject: [PATCH] fix for width or height not multiple of 4 Originally committed as revision 3261 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/smc.c b/libavcodec/smc.c index e937b03c86..47c7d93d4c 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -125,7 +125,7 @@ static void smc_decode_stream(SmcContext *s) chunk_size, s->size); chunk_size = s->size; - total_blocks = (s->avctx->width * s->avctx->height) / (4 * 4); + total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4); /* traverse through the blocks */ while (total_blocks) {