mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 18:35:41 +02:00
Try not calling begin() until after setting up avail_in and _out
This commit is contained in:
@@ -20,9 +20,6 @@ void decompressor::begin() {
|
|||||||
fprintf(stderr, "initialize decompression: %d %s\n", d, zs.msg);
|
fprintf(stderr, "initialize decompression: %d %s\n", d, zs.msg);
|
||||||
exit(EXIT_IMPOSSIBLE);
|
exit(EXIT_IMPOSSIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
zs.avail_out = 0;
|
|
||||||
zs.avail_in = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int decompressor::fread(void *p, size_t size, size_t nmemb, std::atomic<long long> *geompos) {
|
int decompressor::fread(void *p, size_t size, size_t nmemb, std::atomic<long long> *geompos) {
|
||||||
|
|||||||
@@ -1974,10 +1974,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
if (geoms->within) {
|
if (geoms->within) {
|
||||||
geoms->end(geompos_in);
|
geoms->end(geompos_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
geoms->begin();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("fseek to %lld\n", (long long) geoms->fp);
|
||||||
if (fseek(geoms->fp, og, SEEK_SET) != 0) {
|
if (fseek(geoms->fp, og, SEEK_SET) != 0) {
|
||||||
perror("fseek geom");
|
perror("fseek geom");
|
||||||
exit(EXIT_SEEK);
|
exit(EXIT_SEEK);
|
||||||
@@ -1986,6 +1985,10 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
*geompos_in = og;
|
*geompos_in = og;
|
||||||
geoms->zs.avail_in = 0;
|
geoms->zs.avail_in = 0;
|
||||||
geoms->zs.avail_out = 0;
|
geoms->zs.avail_out = 0;
|
||||||
|
|
||||||
|
if (compressed_input) {
|
||||||
|
geoms->begin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int prefilter_write = -1, prefilter_read = -1;
|
int prefilter_write = -1, prefilter_read = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user