From 7ae91795c6830d0a8e708746193d2fb1243a0deb Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 30 Aug 2018 19:45:15 +0800 Subject: Remove unreachable code. JBIG2 images are detected by build_compression_params() and then always passed to fz_open_image_decomp_stream() by build_filter(). Therefore there is no chance for build_filter() at a later stage to detect JBIG2 images, and so that check can be removed. --- source/pdf/pdf-stream.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c index 2b2f010d..f52539cf 100644 --- a/source/pdf/pdf-stream.c +++ b/source/pdf/pdf-stream.c @@ -193,9 +193,6 @@ build_filter(fz_context *ctx, fz_stream *chain, pdf_document *doc, pdf_obj *f, p else if (pdf_name_eq(ctx, f, PDF_NAME(ASCII85Decode)) || pdf_name_eq(ctx, f, PDF_NAME(A85))) return fz_open_a85d(ctx, chain); - else if (pdf_name_eq(ctx, f, PDF_NAME(JBIG2Decode))) - return fz_open_jbig2d(ctx, chain, params->u.jbig2.globals); /* takes ownership of jbig2_globals */ - else if (pdf_name_eq(ctx, f, PDF_NAME(JPXDecode))) return fz_keep_stream(ctx, chain); /* JPX decoding is special cased in the image loading code */ -- cgit v1.2.3