[vlc-commits] jpeg: remove invalid cast
Rémi Denis-Courmont
git at videolan.org
Thu Apr 21 22:40:04 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 21 23:36:36 2016 +0300| [2d2e92ecefda18c36cac88103f9a4b0fc225b29a] | committer: Rémi Denis-Courmont
jpeg: remove invalid cast
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d2e92ecefda18c36cac88103f9a4b0fc225b29a
---
modules/codec/jpeg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c
index 3b82432..7eb9fee 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -565,6 +565,7 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
}
JSAMPIMAGE p_row_pointers = NULL;
+ unsigned long size = p_block->i_buffer;
/* libjpeg longjmp's there in case of error */
if (setjmp(p_sys->setjmp_buffer))
@@ -573,7 +574,7 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
}
jpeg_create_compress(&p_sys->p_jpeg);
- jpeg_mem_dest(&p_sys->p_jpeg, &p_block->p_buffer, (long unsigned int *)&p_block->i_buffer);
+ jpeg_mem_dest(&p_sys->p_jpeg, &p_block->p_buffer, &size);
p_sys->p_jpeg.image_width = p_enc->fmt_in.video.i_visible_width;
p_sys->p_jpeg.image_height = p_enc->fmt_in.video.i_visible_height;
@@ -627,6 +628,7 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
}
free(p_row_pointers);
+ p_block->i_buffer = size;
p_block->i_dts = p_block->i_pts = p_pic->date;
return p_block;
More information about the vlc-commits
mailing list