summaryrefslogtreecommitdiff
path: root/src/transfer_function.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-07 10:23:47 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-07 10:23:47 +0000
commit765a960ea8bb9d829d625901662f54c60f954f3d (patch)
tree76678428e6e5f4532d525e4847ff903a9aa79a8a /src/transfer_function.cc
parent02279f7c2a7ab8ec8cc416da528bc53dcc8f2c9f (diff)
parent038ae17545335e5d1b33746b0193e85ee9f584fe (diff)
Merge branch '1.0' of git.carlh.net:git/libdcp into 1.0
Diffstat (limited to 'src/transfer_function.cc')
-rw-r--r--src/transfer_function.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transfer_function.cc b/src/transfer_function.cc
index d889cbbc..8a844d9b 100644
--- a/src/transfer_function.cc
+++ b/src/transfer_function.cc
@@ -33,6 +33,8 @@ TransferFunction::TransferFunction (bool inverse)
TransferFunction::~TransferFunction ()
{
+ boost::mutex::scoped_lock lm (_mutex);
+
for (map<int, double*>::const_iterator i = _luts.begin(); i != _luts.end(); ++i) {
delete[] i->second;
}
@@ -43,6 +45,8 @@ TransferFunction::~TransferFunction ()
double const *
TransferFunction::lut (int bit_depth) const
{
+ boost::mutex::scoped_lock lm (_mutex);
+
map<int, double*>::const_iterator i = _luts.find (bit_depth);
if (i != _luts.end ()) {
return i->second;