diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 20:03:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 20:03:54 +0300 |
commit | f74c10c4ec6435471bac84473fe865f90843c2df (patch) | |
tree | b2853d87789dbb84d6c26c259eab6639d3a7e482 /indra/llimage/llimagejpeg.cpp | |
parent | 5fccb539937a52d286274a002266e022e2102e5e (diff) | |
parent | 32fcefc058ae38eff0572326ef3efd1c7b343144 (diff) |
Merge branch 'DRTVWR-600-maint-A' into signal/trim-trailing
Diffstat (limited to 'indra/llimage/llimagejpeg.cpp')
-rw-r--r-- | indra/llimage/llimagejpeg.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index 93f1d0cdc4..0e7ec365d4 100644 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -50,6 +50,8 @@ bool LLImageJPEG::updateData() { resetLastError(); + LLImageDataLock lock(this); + // Check to make sure that this instance has been initialized with data if (!getData() || (0 == getDataSize())) { @@ -189,6 +191,9 @@ bool LLImageJPEG::decode(LLImageRaw* raw_image, F32 decode_time) resetLastError(); + LLImageDataLock lockIn(this); + LLImageDataLock lockOut(raw_image); + // Check to make sure that this instance has been initialized with data if (!getData() || (0 == getDataSize())) { @@ -408,6 +413,8 @@ void LLImageJPEG::encodeTermDestination( j_compress_ptr cinfo ) { LLImageJPEG* self = (LLImageJPEG*) cinfo->client_data; + LLImageDataLock lock(self); + S32 file_bytes = (S32)(self->mOutputBufferSize - cinfo->dest->free_in_buffer); self->allocateData(file_bytes); @@ -484,6 +491,9 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time ) resetLastError(); + LLImageDataSharedLock lockIn(raw_image); + LLImageDataLock lockOut(this); + switch( raw_image->getComponents() ) { case 1: |