diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-03-21 08:15:32 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:11:07 -0500 |
commit | 8fb550cc3eae6e744da4b58a75ef58bf0fb1caf4 (patch) | |
tree | cbcb9e540232a6a7c0ca74f034386b903b9db5e9 /pngwio.c | |
parent | 6917b51660c2cf0feddf83f55c3c5e92a8181abb (diff) | |
download | libpng-8fb550cc3eae6e744da4b58a75ef58bf0fb1caf4.tar.gz |
Imported from libpng-1.4.0beta51.tarv1.4.0beta51
Diffstat (limited to 'pngwio.c')
-rw-r--r-- | pngwio.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.4.0 [March 9, 2009] + * Last changed in libpng 1.4.0 [March 21, 2009] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -119,8 +119,7 @@ png_default_flush(png_structp png_ptr) png_FILE_p io_ptr; if (png_ptr == NULL) return; io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL && png_fileno(io_ptr) != -1) - fflush(io_ptr); + fflush(io_ptr); } #endif #endif @@ -149,7 +148,10 @@ png_default_flush(png_structp png_ptr) PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time, output_flush_fn will be ignored, although it must be supplied for compatibility. May be NULL, in which case - libpng's default function will be used. */ + libpng's default function will be used, if + PNG_WRITE_FLUSH_SUPPORTED is defined. This is not + a good idea if io_ptr does not point to a standard + *FILE structure. */ void PNGAPI png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) |