mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c. A new shared keyword check routine was also added and the 'zbuf' is no longer allocated on progressive read. It is now possible to call png_inflate() incrementally.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
6038b80277
commit
b5d0051dcb
@@ -838,7 +838,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
png_crc_finish(png_ptr, 0);
|
||||
png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
png_ptr->flags &= ~PNG_FLAG_ZSTREAM_IN_USE;
|
||||
png_ptr->zowner = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,7 +894,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
|
||||
{
|
||||
/* Terminate the decompression. */
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
|
||||
png_ptr->flags &= ~PNG_FLAG_ZSTREAM_IN_USE;
|
||||
png_ptr->zowner = 0;
|
||||
|
||||
/* This may be a truncated stream (missing or
|
||||
* damaged end code). Treat that as a warning.
|
||||
@@ -923,7 +923,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
|
||||
/* Extra data. */
|
||||
png_warning(png_ptr, "Extra compressed data in IDAT");
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
|
||||
png_ptr->flags &= ~PNG_FLAG_ZSTREAM_IN_USE;
|
||||
png_ptr->zowner = 0;
|
||||
|
||||
/* Do no more processing; skip the unprocessed
|
||||
* input check below.
|
||||
|
||||
Reference in New Issue
Block a user