# HG changeset patch # User michaelni # Date 1013047716 0 # Node ID 5784987c3940f0425ce931f710cdd6bbd6258e5a # Parent ae145876789dd36da5e4db7438c00c00cbfc09c8 width or height %16 != 0 bugfix diff -r ae145876789d -r 5784987c3940 mjpeg.c --- a/mjpeg.c Tue Feb 05 22:51:23 2002 +0000 +++ b/mjpeg.c Thu Feb 07 02:08:36 2002 +0000 @@ -620,13 +620,11 @@ } for(i=0;ih_max / s->h_count[i]; - vv = s->v_max / s->v_count[i]; - w = (s->width + 8 * hh - 1) / (8 * hh); - h = (s->height + 8 * vv - 1) / (8 * vv); - w = w * 8; - h = h * 8; + int w, h; + w = (s->width + 8 * s->h_max - 1) / (8 * s->h_max); + h = (s->height + 8 * s->v_max - 1) / (8 * s->v_max); + w = w * 8 * s->h_count[i]; + h = h * 8 * s->v_count[i]; if (s->interlaced) w *= 2; s->linesize[i] = w;