mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Create png_reverse_filter_deinit
This commit is contained in:
parent
0c29342fd6
commit
ef09b9a855
@ -89,6 +89,14 @@ static void deinterlace_pass(uint32_t *data, const struct png_ihdr *ihdr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void png_reverse_filter_deinit(struct rpng_process_t *pngp)
|
||||||
|
{
|
||||||
|
if (pngp->decoded_scanline)
|
||||||
|
free(pngp->decoded_scanline);
|
||||||
|
if (pngp->prev_scanline)
|
||||||
|
free(pngp->prev_scanline);
|
||||||
|
}
|
||||||
|
|
||||||
static bool png_reverse_filter_init(uint32_t *data, const struct png_ihdr *ihdr,
|
static bool png_reverse_filter_init(uint32_t *data, const struct png_ihdr *ihdr,
|
||||||
struct rpng_process_t *pngp)
|
struct rpng_process_t *pngp)
|
||||||
{
|
{
|
||||||
@ -105,8 +113,7 @@ static bool png_reverse_filter_init(uint32_t *data, const struct png_ihdr *ihdr,
|
|||||||
|
|
||||||
if (!pngp->prev_scanline || !pngp->decoded_scanline)
|
if (!pngp->prev_scanline || !pngp->decoded_scanline)
|
||||||
{
|
{
|
||||||
free(pngp->decoded_scanline);
|
png_reverse_filter_deinit(pngp);
|
||||||
free(pngp->prev_scanline);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,10 +193,7 @@ static bool png_reverse_filter(uint32_t *data, const struct png_ihdr *ihdr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (pngp->decoded_scanline)
|
png_reverse_filter_deinit(pngp);
|
||||||
free(pngp->decoded_scanline);
|
|
||||||
if (pngp->prev_scanline)
|
|
||||||
free(pngp->prev_scanline);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user