diff options
Diffstat (limited to 'indra/llimage/llimageworker.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/llimage/llimageworker.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index d1c74b6fa1..4875fe7001 100644..100755 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -38,9 +38,15 @@ LLImageDecodeThread::LLImageDecodeThread(bool threaded) mCreationMutex = new LLMutex(getAPRPool()); } +//virtual +LLImageDecodeThread::~LLImageDecodeThread() +{ + delete mCreationMutex ; +} + // MAIN THREAD // virtual -S32 LLImageDecodeThread::update(U32 max_time_ms) +S32 LLImageDecodeThread::update(F32 max_time_ms) { LLMutexLock lock(mCreationMutex); for (creation_list_t::iterator iter = mCreationList.begin(); @@ -54,7 +60,7 @@ S32 LLImageDecodeThread::update(U32 max_time_ms) bool res = addRequest(req); if (!res) { - llerrs << "request added after LLLFSThread::cleanupClass()" << llendl; + LL_ERRS() << "request added after LLLFSThread::cleanupClass()" << LL_ENDL; } } mCreationList.clear(); @@ -137,7 +143,8 @@ bool LLImageDecodeThread::ImageRequest::processRequest() mFormattedImage->getComponents()); } done = mFormattedImage->decode(mDecodedImageRaw, decode_time_slice); // 1ms - mDecodedRaw = done; + // some decoders are removing data when task is complete and there were errors + mDecodedRaw = done && mDecodedImageRaw->getData(); } if (done && mNeedsAux && !mDecodedAux && mFormattedImage.notNull()) { @@ -149,7 +156,7 @@ bool LLImageDecodeThread::ImageRequest::processRequest() 1); } done = mFormattedImage->decodeChannels(mDecodedImageAux, decode_time_slice, 4, 4); // 1ms - mDecodedAux = done; + mDecodedAux = done && mDecodedImageAux->getData(); } return done; |