fix rawcp/rawcc maintinance for lzma compressor
This commit is contained in:
parent
f54758cb96
commit
202ed69f77
@ -1,3 +1,8 @@
|
|||||||
|
2011-02-22 Frank Warmerdam <warmerdam@pobox.com>
|
||||||
|
|
||||||
|
* libtiff/tif_lzma.c: Maintain tif_rawcc/tif_rawcp (CHUNKY_STRING_READ
|
||||||
|
_SUPPORT)
|
||||||
|
|
||||||
2011-02-18 Frank Warmerdam <warmerdam@pobox.com>
|
2011-02-18 Frank Warmerdam <warmerdam@pobox.com>
|
||||||
|
|
||||||
* configure.ac, configure: Added support for --enable-chunky-strip-read
|
* configure.ac, configure: Added support for --enable-chunky-strip-read
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_lzma.c,v 1.2 2010-12-23 13:07:38 dron Exp $ */
|
/* $Id: tif_lzma.c,v 1.3 2011-02-22 21:55:13 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, Andrey Kiselev <dron@ak4719.spb.edu>
|
* Copyright (c) 2010, Andrey Kiselev <dron@ak4719.spb.edu>
|
||||||
@ -171,6 +171,9 @@ LZMADecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
|||||||
assert(sp != NULL);
|
assert(sp != NULL);
|
||||||
assert(sp->state == LSTATE_INIT_DECODE);
|
assert(sp->state == LSTATE_INIT_DECODE);
|
||||||
|
|
||||||
|
sp->stream.next_in = tif->tif_rawcp;
|
||||||
|
sp->stream.avail_in = (size_t) tif->tif_rawcc;
|
||||||
|
|
||||||
sp->stream.next_out = op;
|
sp->stream.next_out = op;
|
||||||
sp->stream.avail_out = (size_t) occ;
|
sp->stream.avail_out = (size_t) occ;
|
||||||
if ((tmsize_t)sp->stream.avail_out != occ) {
|
if ((tmsize_t)sp->stream.avail_out != occ) {
|
||||||
@ -216,6 +219,10 @@ LZMADecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
|||||||
(unsigned long) tif->tif_row, (unsigned long) sp->stream.avail_out);
|
(unsigned long) tif->tif_row, (unsigned long) sp->stream.avail_out);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tif->tif_rawcp = sp->stream.next_in;
|
||||||
|
tif->tif_rawcc = sp->stream.avail_in;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user