diff options
Diffstat (limited to 'indra/llimage')
-rwxr-xr-x | indra/llimage/llimage.cpp | 4 | ||||
-rwxr-xr-x | indra/llimage/llimagefilter.cpp | 2 | ||||
-rwxr-xr-x | indra/llimage/llimageworker.cpp | 5 | ||||
-rwxr-xr-x | indra/llimage/tests/llimageworker_test.cpp | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index ecdcd95d29..16df27bb8e 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -1172,7 +1172,7 @@ static std::string find_file(std::string &name, S8 *codec) for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) { tname = name + "." + std::string(file_extensions[i].exten); - llifstream ifs(tname, llifstream::binary); + llifstream ifs(tname.c_str(), llifstream::binary); if (ifs.is_open()) { ifs.close(); @@ -1219,7 +1219,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip return false; // format not recognized } - llifstream ifs(name, llifstream::binary); + llifstream ifs(name.c_str(), llifstream::binary); if (!ifs.is_open()) { // SJB: changed from LL_INFOS() to LL_DEBUGS() to reduce spam diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp index 0b9d136910..41adc7be9a 100755 --- a/indra/llimage/llimagefilter.cpp +++ b/indra/llimage/llimagefilter.cpp @@ -54,7 +54,7 @@ LLImageFilter::LLImageFilter(const std::string& file_path) : mStencilMax(1.0) { // Load filter description from file - llifstream filter_xml(file_path); + llifstream filter_xml(file_path.c_str()); if (filter_xml.is_open()) { // Load and parse the file diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index c8b0e872f6..4875fe7001 100755 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -143,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()) { @@ -155,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; diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index c030b105fb..51c5c63556 100755 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -67,6 +67,8 @@ LLImageRaw::~LLImageRaw() { } void LLImageRaw::deleteData() { } U8* LLImageRaw::allocateData(S32 size) { return NULL; } U8* LLImageRaw::reallocateData(S32 size) { return NULL; } +const U8* LLImageBase::getData() const { return NULL; } +U8* LLImageBase::getData() { return NULL; } // End Stubbing // ------------------------------------------------------------------------------------------- |