* Fixed an EOC marker sanity check in CSJ2K that was potentially reading past the end of the stream
* If CSJ2K packet decoding tries to read past the end of the stream, just terminate the decoding and return what we have so far instead of throwing an exception. This experimental fix should improve the JPEG2000 decoding success rate git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3406 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -1433,7 +1433,13 @@ namespace CSJ2K.j2k.codestream.reader
|
||||
ccb.ntp[l] = 0;
|
||||
ccb.pktIdx[l] = - 1;
|
||||
}
|
||||
throw new System.IO.EndOfStreamException();
|
||||
|
||||
// JH: If we try and seek past the end of the stream just stop the decoding
|
||||
curOff = ehs.length() - 1;
|
||||
ehs.seek(curOff);
|
||||
stopRead = true;
|
||||
return true;
|
||||
//throw new System.IO.EndOfStreamException();
|
||||
}
|
||||
|
||||
// If truncation mode
|
||||
|
||||
Reference in New Issue
Block a user