image_writer: fix writing flipped images as jpg

next_scanline is usually an unsigned int.

Fixes #2635 (again).
This commit is contained in:
wm4 2016-01-17 19:39:55 +01:00
parent 4195a345a5
commit 7b4ccb3e9f
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
while (cinfo.next_scanline < cinfo.image_height) {
JSAMPROW row_pointer[1];
row_pointer[0] = image->planes[0] +
cinfo.next_scanline * image->stride[0];
(ptrdiff_t)cinfo.next_scanline * image->stride[0];
jpeg_write_scanlines(&cinfo, row_pointer,1);
}