]> git.imager.perl.org - imager.git/commitdiff
PNG-rework: forward png flush output through to i_io_flush()
authorTony Cook <tony@develop-help.com>
Sun, 15 Apr 2012 03:20:19 +0000 (13:20 +1000)
committerTony Cook <tony@develop-help.com>
Sun, 29 Apr 2012 03:40:56 +0000 (13:40 +1000)
PNG/impng.c

index 5f1d325c6459acd4ca7634cb19a3dc55883511d0..f9a7a25272a3b4a034bd177cd5b7f1936ea70054 100644 (file)
@@ -55,7 +55,9 @@ wiol_write_data(png_structp png_ptr, png_bytep data, png_size_t length) {
 
 static void
 wiol_flush_data(png_structp png_ptr) {
-  /* XXX : This needs to be added to the io layer */
+  io_glue *ig = png_get_io_ptr(png_ptr);
+  if (!i_io_flush(ig))
+    png_error(png_ptr, "Error flushing output");
 }
 
 static void