changeset 2103:bcc91fa67694 libavcodec

fix for width or height not multiple of 4
author rtognimp
date Sun, 27 Jun 2004 11:06:30 +0000
parents 6681dcffb5cf
children 586a6e8f3290
files smc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/smc.c	Sat Jun 26 15:00:26 2004 +0000
+++ b/smc.c	Sun Jun 27 11:06:30 2004 +0000
@@ -125,7 +125,7 @@
             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) {