mirror of https://github.com/mpv-player/mpv
image_writer: fix writing flipped images as jpg
next_scanline is usually an unsigned int. Fixes #2635 (again).
This commit is contained in:
parent
4195a345a5
commit
7b4ccb3e9f
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue