Skip to content

Commit

Permalink
image_writer: fix writing flipped images as jpg
Browse files Browse the repository at this point in the history
next_scanline is usually an unsigned int.

Fixes #2635 (again).
  • Loading branch information
wm4 committed Jan 17, 2016
1 parent 4195a34 commit 7b4ccb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion video/image_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7b4ccb3

Please sign in to comment.