diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-07-05 17:55:18 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-07-05 18:02:03 +0100 |
commit | eeaccf8444a4884801a92c0d23f66bd54c986a67 (patch) | |
tree | fc9e254dfeef4d61a80aace2f5dbbcd985580a9a /fitz/filt_dctd.c | |
parent | b81be8d34b179d48e677463bd7b66ffdea129517 (diff) | |
parent | 15fc25b0055dbdbfaf4257ac908d43fd5a2da19d (diff) | |
download | mupdf-eeaccf8444a4884801a92c0d23f66bd54c986a67.tar.xz |
Merge branch 'master' into forms
Diffstat (limited to 'fitz/filt_dctd.c')
-rw-r--r-- | fitz/filt_dctd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fitz/filt_dctd.c b/fitz/filt_dctd.c index 23744f01..1b588d2a 100644 --- a/fitz/filt_dctd.c +++ b/fitz/filt_dctd.c @@ -101,12 +101,17 @@ read_dctd(fz_stream *stm, unsigned char *buf, int len) if (!state->init) { + int c; cinfo->client_data = state; cinfo->err = &state->errmgr; jpeg_std_error(cinfo->err); cinfo->err->error_exit = error_exit; jpeg_create_decompress(cinfo); + /* Skip over any stray returns at the start of the stream */ + while ((c = fz_peek_byte(state->chain)) == '\n' || c == '\r') + (void)fz_read_byte(state->chain); + cinfo->src = &state->srcmgr; cinfo->src->init_source = init_source; cinfo->src->fill_input_buffer = fill_input_buffer; |