diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-06 13:09:48 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-06 13:09:48 -0800 |
commit | 78db8dd83b76466df83abc32d56aa74ac7b180f3 (patch) | |
tree | 369b4d8db3081fcf71a27572a00d310c7b9aaaf6 /indra/llimage/llimagejpeg.cpp | |
parent | d4f790f72866b43956ce4216bf6471c85f4afc6c (diff) | |
parent | 3f8172707833f30d3c39d165c975bd3d97511080 (diff) |
merge from remote repo
Diffstat (limited to 'indra/llimage/llimagejpeg.cpp')
-rw-r--r-- | indra/llimage/llimagejpeg.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index fa0dd3ff05..79ea79cc07 100644 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -188,6 +188,7 @@ void LLImageJPEG::decodeTermSource (j_decompress_ptr cinfo) } +// Returns true when done, whether or not decode was successful. BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) { llassert_always(raw_image); @@ -198,7 +199,7 @@ BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) if (!getData() || (0 == getDataSize())) { setLastError("LLImageJPEG trying to decode an image with no data!"); - return FALSE; + return TRUE; // done } S32 row_stride = 0; @@ -226,7 +227,7 @@ BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) if(setjmp(sSetjmpBuffer)) { jpeg_destroy_decompress(&cinfo); - return FALSE; + return TRUE; // done } try { @@ -320,7 +321,7 @@ BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) catch (int) { jpeg_destroy_decompress(&cinfo); - return FALSE; + return TRUE; // done } // Check to see whether any corrupt-data warnings occurred @@ -328,7 +329,7 @@ BOOL LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) { // TODO: extract the warning to find out what went wrong. setLastError( "Unable to decode JPEG image."); - return FALSE; + return TRUE; // done } return TRUE; |