summaryrefslogtreecommitdiff
path: root/poppler/JPEG2000Stream.cc
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-01-27 00:36:18 +0100
committerAlbert Astals Cid <aacid@kde.org>2012-01-27 00:43:21 +0100
commitcbe7131e63c5896010e7e1ad5c0c3aa91611704d (patch)
tree2329ff596ceb19e898bce3980ad3b2206cabdf6a /poppler/JPEG2000Stream.cc
parent641526d1a7e8032ea8f7b8ac42c5ad8c20448d9b (diff)
Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it
Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) (cherry picked from commit de6415af1a39ec7dfa4f149c6c5e311b86352cec)
Diffstat (limited to 'poppler/JPEG2000Stream.cc')
-rw-r--r--poppler/JPEG2000Stream.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index b7a29bf2..5ea6406e 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -4,7 +4,7 @@
//
// A JPX stream decoder using OpenJPEG
//
-// Copyright 2008-2010 Albert Astals Cid <aacid@kde.org>
+// Copyright 2008-2010, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright 2011 Daniel Glöckner <daniel-gl@gmx.net>
//
// Licensed under GPLv2 or later
@@ -13,6 +13,8 @@
#include "JPEG2000Stream.h"
+#include "config.h"
+
JPXStream::JPXStream(Stream *strA) : FilterStream(strA)
{
inited = gFalse;
@@ -127,6 +129,9 @@ void JPXStream::init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format)
/* Use default decompression parameters */
opj_dparameters_t parameters;
opj_set_default_decoder_parameters(&parameters);
+#ifdef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG
+ parameters.flags = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
+#endif
/* Configure the event manager to receive errors and warnings */
opj_event_mgr_t event_mgr;