diff options
Diffstat (limited to 'src/libtiff/tif_dirwrite.c')
-rw-r--r-- | src/libtiff/tif_dirwrite.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libtiff/tif_dirwrite.c b/src/libtiff/tif_dirwrite.c index 7d5ca71..b04b73a 100644 --- a/src/libtiff/tif_dirwrite.c +++ b/src/libtiff/tif_dirwrite.c @@ -1,4 +1,4 @@ -/* $Id: tif_dirwrite.c,v 1.2 2009/08/21 04:01:59 scuri Exp $ */ +/* $Id: tif_dirwrite.c,v 1.3 2009/09/29 21:26:38 scuri Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -100,8 +100,6 @@ _TIFFWriteDirectory(TIFF* tif, int done) */ if (done) { - tsize_t orig_rawcc = tif->tif_rawcc; - if (tif->tif_flags & TIFF_POSTENCODE) { tif->tif_flags &= ~TIFF_POSTENCODE; if (!(*tif->tif_postencode)(tif)) { @@ -114,12 +112,9 @@ _TIFFWriteDirectory(TIFF* tif, int done) (*tif->tif_close)(tif); /* shutdown encoder */ /* * Flush any data that might have been written - * by the compression close+cleanup routines. But - * be careful not to write stuff if we didn't add data - * in the previous steps as the "rawcc" data may well be - * a previously read tile/strip in mixed read/write mode. + * by the compression close+cleanup routines. */ - if (tif->tif_rawcc > 0 && tif->tif_rawcc != orig_rawcc + if (tif->tif_rawcc > 0 && (tif->tif_flags & TIFF_BEENWRITING) != 0 && !TIFFFlushData1(tif)) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, |