mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Delay calling png_init_filter_functions() until a row with nonzero
filter is found.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.6.3 [July 18, 2013]
|
||||
* Last changed in libpng 1.6.4 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -3922,10 +3922,13 @@ png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
|
||||
* PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic
|
||||
* implementations. See png_init_filter_functions above.
|
||||
*/
|
||||
if (pp->read_filter[0] == NULL)
|
||||
png_init_filter_functions(pp);
|
||||
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||
{
|
||||
if (pp->read_filter[0] == NULL)
|
||||
png_init_filter_functions(pp);
|
||||
|
||||
pp->read_filter[filter-1](row_info, row, prev_row);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
|
||||
Reference in New Issue
Block a user