Commit 73ff5ad5 authored by Albert Astals Cid's avatar Albert Astals Cid

Pass the recursion flag

parent 837e3704
......@@ -60,16 +60,16 @@ static void str_term_source(j_decompress_ptr cinfo)
{
}
DCTStream::DCTStream(Stream *strA, int colorXformA, Object *dict) :
DCTStream::DCTStream(Stream *strA, int colorXformA, Object *dict, int recursion) :
FilterStream(strA) {
colorXform = colorXformA;
if (dict != NULL) {
Object obj;
dict->dictLookup("Width", &obj);
dict->dictLookup("Width", &obj, recursion);
err.width = (obj.isInt() && obj.getInt() <= JPEG_MAX_DIMENSION) ? obj.getInt() : 0;
obj.free();
dict->dictLookup("Height", &obj);
dict->dictLookup("Height", &obj, recursion);
err.height = (obj.isInt() && obj.getInt() <= JPEG_MAX_DIMENSION) ? obj.getInt() : 0;
obj.free();
} else
......
......@@ -64,7 +64,7 @@ struct str_error_mgr {
class DCTStream: public FilterStream {
public:
DCTStream(Stream *strA, int colorXformA, Object *dict);
DCTStream(Stream *strA, int colorXformA, Object *dict, int recursion);
virtual ~DCTStream();
virtual StreamKind getKind() { return strDCT; }
virtual void reset();
......
......@@ -309,7 +309,7 @@ Stream *Stream::makeFilter(char *name, Stream *str, Object *params, int recursio
}
obj.free();
}
str = new DCTStream(str, colorXform, dict);
str = new DCTStream(str, colorXform, dict, recursion);
} else if (!strcmp(name, "FlateDecode") || !strcmp(name, "Fl")) {
pred = 1;
columns = 1;
......@@ -2416,7 +2416,7 @@ static const int dctZigZag[64] = {
63
};
DCTStream::DCTStream(Stream *strA, int colorXformA, Object *dict):
DCTStream::DCTStream(Stream *strA, int colorXformA, Object *dict, int recursion):
FilterStream(strA) {
int i, j;
......
......@@ -862,7 +862,7 @@ struct DCTHuffTable {
class DCTStream: public FilterStream {
public:
DCTStream(Stream *strA, int colorXformA, Object *dict);
DCTStream(Stream *strA, int colorXformA, Object *dict, int recursion);
virtual ~DCTStream();
virtual StreamKind getKind() { return strDCT; }
virtual void reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment