mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-29 03:00:24 +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,
|
||||
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)
|
||||
{
|
||||
free(pngp->decoded_scanline);
|
||||
free(pngp->prev_scanline);
|
||||
png_reverse_filter_deinit(pngp);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -186,10 +193,7 @@ static bool png_reverse_filter(uint32_t *data, const struct png_ihdr *ihdr,
|
||||
}
|
||||
|
||||
end:
|
||||
if (pngp->decoded_scanline)
|
||||
free(pngp->decoded_scanline);
|
||||
if (pngp->prev_scanline)
|
||||
free(pngp->prev_scanline);
|
||||
png_reverse_filter_deinit(pngp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user