diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-01-06 17:49:19 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-01-06 18:04:32 +0000 |
commit | 16911233da82601e2df6b0af49fc2136db38535d (patch) | |
tree | e140bc4262105641a2a32f9522ce605ee86ebcb2 /source/fitz/output-png.c | |
parent | cb91a7732e2e2475f4bcd5cea8ac847a78e24a66 (diff) | |
download | mupdf-16911233da82601e2df6b0af49fc2136db38535d.tar.xz |
Fix /dev/null slowdown.
In commit 80308eae9964e71b66a18f3de6ebcd2ebf0d306b ("Regularize
band writer interface"), I inadvertently slowed down outputting
to /dev/null. Fixed here.
Also take the opportunity to speed ppm/pnm files writing in
general if we don't need to collate.
Diffstat (limited to 'source/fitz/output-png.c')
-rw-r--r-- | source/fitz/output-png.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c index 24e9394f..993bda9f 100644 --- a/source/fitz/output-png.c +++ b/source/fitz/output-png.c @@ -133,6 +133,9 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st int y, x, k, err, finalband; int w, h, n; + if (!out) + return; + w = writer->super.w; h = writer->super.h; n = writer->super.n; |