diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-09 15:59:29 +0200 |
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-09 15:59:29 +0200 |
| commit | 1b0732183e4437ce673b13c8092f8122db884587 (patch) | |
| tree | dc913dbaab1699bb27854d9f22531aa2a6f86e28 /indra/llimage/llimagejpeg.cpp | |
| parent | 148a29ea1ec97922180ca8f0f6ced9a4a9e05c07 (diff) | |
| parent | 21c51025da7f9128a1b425a5e88331ae0e3fe4d4 (diff) | |
Merge
--HG--
branch : product-engine
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; |
