diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-12-13 16:29:18 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-02 20:04:42 +0000 |
commit | 651f13408c67a8392ad93adda079c096d8a6118c (patch) | |
tree | 4f6b68c2d53cdc75d1625649103cc29aedc9e2f7 /source/fitz/filter-predict.c | |
parent | 0dde9978288535003ad9341613b9e4803339500d (diff) | |
download | mupdf-651f13408c67a8392ad93adda079c096d8a6118c.tar.xz |
Add rebinding for fz_streams.
Diffstat (limited to 'source/fitz/filter-predict.c')
-rw-r--r-- | source/fitz/filter-predict.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/fitz/filter-predict.c b/source/fitz/filter-predict.c index c8de290a..6bc75c8e 100644 --- a/source/fitz/filter-predict.c +++ b/source/fitz/filter-predict.c @@ -190,6 +190,13 @@ close_predict(fz_context *ctx, void *state_) fz_free(ctx, state); } +static fz_stream * +rebind_predict(fz_stream *s) +{ + fz_predict *state = s->state; + return state->chain; +} + /* Default values: predictor = 1, columns = 1, colors = 1, bpc = 8 */ fz_stream * fz_open_predict(fz_stream *chain, int predictor, int columns, int colors, int bpc) @@ -252,5 +259,5 @@ fz_open_predict(fz_stream *chain, int predictor, int columns, int colors, int bp fz_rethrow(ctx); } - return fz_new_stream(ctx, state, read_predict, close_predict); + return fz_new_stream(ctx, state, read_predict, close_predict, rebind_predict); } |