summaryrefslogtreecommitdiff
path: root/src/JP2K_Codestream_Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/JP2K_Codestream_Parser.cpp')
-rwxr-xr-xsrc/JP2K_Codestream_Parser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/JP2K_Codestream_Parser.cpp b/src/JP2K_Codestream_Parser.cpp
index 4211653..32a5316 100755
--- a/src/JP2K_Codestream_Parser.cpp
+++ b/src/JP2K_Codestream_Parser.cpp
@@ -90,6 +90,12 @@ public:
while ( p < end_p && ASDCP_SUCCESS(result) )
{
result = GetNextMarker(&p, NextMarker);
+
+ if ( ASDCP_FAILURE(result) )
+ {
+ result = RESULT_RAW_ESS;
+ break;
+ }
#if 0
fprintf(stderr, "%s Length: %u\n",
GetMarkerString(NextMarker.m_Type), NextMarker.m_DataSize);