forked from enlightenment/efl
fix jpeg loading which freed the wrong ptr
fixes T8497 @fix
This commit is contained in:
parent
00aaf99765
commit
6b04e5f215
|
@ -1750,8 +1750,8 @@ _emile_jpeg_data(Emile_Image *image,
|
||||||
uint8_t *ptr, *line[16], *data;
|
uint8_t *ptr, *line[16], *data;
|
||||||
volatile uint32_t *ptr2 = NULL;
|
volatile uint32_t *ptr2 = NULL;
|
||||||
uint32_t *ptr_rotate = NULL;
|
uint32_t *ptr_rotate = NULL;
|
||||||
uint16_t *ptrag = NULL, *ptrag_rotate = NULL;
|
uint16_t *ptrag = NULL, *ptrag2 = NULL, *ptrag_rotate = NULL;
|
||||||
uint8_t *ptrg = NULL, *ptrg_rotate = NULL;
|
uint8_t *ptrg = NULL, *ptrg2 = NULL, *ptrg_rotate = NULL;
|
||||||
unsigned int y, l, i, scans;
|
unsigned int y, l, i, scans;
|
||||||
volatile int region = 0;
|
volatile int region = 0;
|
||||||
/* rotation setting */
|
/* rotation setting */
|
||||||
|
@ -2113,6 +2113,8 @@ _emile_jpeg_data(Emile_Image *image,
|
||||||
/* We finally handle RGB with 1 component */
|
/* We finally handle RGB with 1 component */
|
||||||
else if (cinfo.output_components == 1)
|
else if (cinfo.output_components == 1)
|
||||||
{
|
{
|
||||||
|
ptrg2 = ptrg;
|
||||||
|
ptrag2 = ptrag;
|
||||||
for (i = 0; (int)i < cinfo.rec_outbuf_height; i++)
|
for (i = 0; (int)i < cinfo.rec_outbuf_height; i++)
|
||||||
line[i] = data + (i * w);
|
line[i] = data + (i * w);
|
||||||
for (l = 0; l < h; l += cinfo.rec_outbuf_height)
|
for (l = 0; l < h; l += cinfo.rec_outbuf_height)
|
||||||
|
@ -2132,10 +2134,10 @@ _emile_jpeg_data(Emile_Image *image,
|
||||||
switch (prop->cspace)
|
switch (prop->cspace)
|
||||||
{
|
{
|
||||||
case EMILE_COLORSPACE_GRY8:
|
case EMILE_COLORSPACE_GRY8:
|
||||||
_jpeg_gry8_convert_copy(&ptrg, &ptr, w);
|
_jpeg_gry8_convert_copy(&ptrg2, &ptr, w);
|
||||||
break;
|
break;
|
||||||
case EMILE_COLORSPACE_AGRY88:
|
case EMILE_COLORSPACE_AGRY88:
|
||||||
_jpeg_agry88_convert_copy(&ptrag, &ptr, w);
|
_jpeg_agry88_convert_copy(&ptrag2, &ptr, w);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_jpeg_argb8888_convert_copy(&ptr2, &ptr, w);
|
_jpeg_argb8888_convert_copy(&ptr2, &ptr, w);
|
||||||
|
@ -2168,10 +2170,10 @@ _emile_jpeg_data(Emile_Image *image,
|
||||||
switch (prop->cspace)
|
switch (prop->cspace)
|
||||||
{
|
{
|
||||||
case EMILE_COLORSPACE_GRY8:
|
case EMILE_COLORSPACE_GRY8:
|
||||||
_jpeg_gry8_convert_copy(&ptrg, &ptr, opts_region.w);
|
_jpeg_gry8_convert_copy(&ptrg2, &ptr, opts_region.w);
|
||||||
break;
|
break;
|
||||||
case EMILE_COLORSPACE_AGRY88:
|
case EMILE_COLORSPACE_AGRY88:
|
||||||
_jpeg_agry88_convert_copy(&ptrag, &ptr, opts_region.w);
|
_jpeg_agry88_convert_copy(&ptrag2, &ptr, opts_region.w);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_jpeg_argb8888_convert_copy(&ptr2, &ptr, opts_region.w);
|
_jpeg_argb8888_convert_copy(&ptr2, &ptr, opts_region.w);
|
||||||
|
|
Loading…
Reference in New Issue