aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llimagej2coj
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llimagej2coj
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llimagej2coj')
-rw-r--r--linden/indra/llimagej2coj/llimagej2coj.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp
index 3ca271c..01868fd 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.cpp
+++ b/linden/indra/llimagej2coj/llimagej2coj.cpp
@@ -158,6 +158,18 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
158 return TRUE; // done 158 return TRUE; // done
159 } 159 }
160 160
161 // sometimes we get bad data out of the cache - check to see if the decode succeeded
162 for (S32 i = 0; i < image->numcomps; i++)
163 {
164 if (image->comps[i].factor != base.getRawDiscardLevel())
165 {
166 // if we didn't get the discard level we're expecting, fail
167 opj_image_destroy(image);
168 base.mDecoding = FALSE;
169 return TRUE;
170 }
171 }
172
161 // Copy image data into our raw image format (instead of the separate channel format 173 // Copy image data into our raw image format (instead of the separate channel format
162 174
163 S32 img_components = image->numcomps; 175 S32 img_components = image->numcomps;