poppler/JPEG2000Stream.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
New commits: commit fe97135ffb18eaaec7d23a7394641ba103bfe48d Author: Albert Astals Cid <[email protected]> Date: Tue Aug 1 19:30:28 2017 +0200 Make the openjpeg1 code compile with the new Object API diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc index 2b6af900..12ee33f1 100644 --- a/poppler/JPEG2000Stream.cc +++ b/poppler/JPEG2000Stream.cc @@ -196,25 +196,20 @@ static void libopenjpeg_warning_callback(const char *msg, void * /*client_data*/ void JPXStream::init() { Object oLen, cspace, smaskInData; - if (getDict()) getDict()->lookup("Length", &oLen); - if (getDict()) getDict()->lookup("ColorSpace", &cspace); - if (getDict()) getDict()->lookup("SMaskInData", &smaskInData); + if (getDict()) oLen = getDict()->lookup("Length"); + if (getDict()) cspace = getDict()->lookup("ColorSpace"); + if (getDict()) smaskInData = getDict()->lookup("SMaskInData"); int bufSize = BUFFER_INITIAL_SIZE; if (oLen.isInt()) bufSize = oLen.getInt(); - oLen.free(); if (cspace.isArray() && cspace.arrayGetLength() > 0) { - Object cstype; - cspace.arrayGet(0, &cstype); + Object cstype = cspace.arrayGet(0); if (cstype.isName("Indexed")) priv->indexed = gTrue; - cstype.free(); } - cspace.free(); priv->smaskInData = 0; if (smaskInData.isInt()) priv->smaskInData = smaskInData.getInt(); - smaskInData.free(); int length = 0; unsigned char *buf = str->toUnsignedChars(&length, bufSize); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
