[libpng16] Only mark text chunks as written after successfully writing them.

This commit is contained in:
Glenn Randers-Pehrson
2014-10-05 13:45:38 -05:00
parent f56c00f050
commit a11cd84160
5 changed files with 19 additions and 6 deletions

View File

@@ -396,6 +396,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
row_info.pixel_depth = png_ptr->pixel_depth;
row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width);
#ifdef PNG_WARNINGS_SUPPORTED
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
{
/* Check for transforms that have been set but were defined out */
@@ -435,6 +436,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined");
#endif
}
#endif /* PNG_WARNINGS_SUPPORTED */
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* If interlaced and we do not need a new row, combine row and return.