summaryrefslogtreecommitdiff
path: root/source/fitz/filter-lzw.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-12-13 16:29:18 +0000
committerRobin Watts <robin.watts@artifex.com>2014-01-02 20:04:42 +0000
commit651f13408c67a8392ad93adda079c096d8a6118c (patch)
tree4f6b68c2d53cdc75d1625649103cc29aedc9e2f7 /source/fitz/filter-lzw.c
parent0dde9978288535003ad9341613b9e4803339500d (diff)
downloadmupdf-651f13408c67a8392ad93adda079c096d8a6118c.tar.xz
Add rebinding for fz_streams.
Diffstat (limited to 'source/fitz/filter-lzw.c')
-rw-r--r--source/fitz/filter-lzw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/fitz/filter-lzw.c b/source/fitz/filter-lzw.c
index 63d6555b..c78c8c3f 100644
--- a/source/fitz/filter-lzw.c
+++ b/source/fitz/filter-lzw.c
@@ -174,6 +174,13 @@ close_lzwd(fz_context *ctx, void *state_)
fz_free(ctx, lzw);
}
+static fz_stream *
+rebind_lzwd(fz_stream *s)
+{
+ fz_lzwd *state = s->state;
+ return state->chain;
+}
+
/* Default: early_change = 1 */
fz_stream *
fz_open_lzwd(fz_stream *chain, int early_change)
@@ -221,5 +228,5 @@ fz_open_lzwd(fz_stream *chain, int early_change)
fz_rethrow(ctx);
}
- return fz_new_stream(ctx, lzw, read_lzwd, close_lzwd);
+ return fz_new_stream(ctx, lzw, read_lzwd, close_lzwd, rebind_lzwd);
}