mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Delay calling png_init_filter_functions() until a row with nonzero
filter is found.
This commit is contained in:
@@ -3882,10 +3882,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