mpegvideo: fix loop condition in draw_line()

The loop condition `x = ex' is incorrect.  It should be `x <= ex'.

This bug was introduced in commit c65dfac4 "mpegvideo.c: K&R formatting
and cosmetics."

CC:libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Xi Wang 2013-01-19 13:21:35 -05:00 committed by Luca Barbato
parent 40976257bc
commit 992b031838

View File

@ -1659,7 +1659,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey,
buf += sx + sy * stride; buf += sx + sy * stride;
ex -= sx; ex -= sx;
f = ((ey - sy) << 16) / ex; f = ((ey - sy) << 16) / ex;
for (x = 0; x = ex; x++) { for (x = 0; x <= ex; x++) {
y = (x * f) >> 16; y = (x * f) >> 16;
fr = (x * f) & 0xFFFF; fr = (x * f) & 0xFFFF;
buf[y * stride + x] += (color * (0x10000 - fr)) >> 16; buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;