diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-28 23:02:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-28 23:02:40 +0200 |
| commit | f8661a47b8ddafb6a076456d4d1b9239aa45e4b1 (patch) | |
| tree | d35b29f60b582070d71a1bb359a85f3fcf9e3a54 | |
| parent | 13b5b20a04498447ad710be3b3defaf76bf3038a (diff) | |
Add some missing locks.
| -rw-r--r-- | src/lib/dcp_content.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 70eb8425e..2d441353a 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -461,6 +461,8 @@ DCPContent::identifier () const s += i->identifier () + " "; } + boost::mutex::scoped_lock lm(_mutex); + s += string (_reference_video ? "1" : "0"); for (auto text: _reference_text) { s += string(text ? "1" : "0"); @@ -804,6 +806,13 @@ DCPContent::take_settings_from (shared_ptr<const Content> c) return; } + if (this == dc.get()) { + return; + } + + boost::mutex::scoped_lock lm(_mutex); + boost::mutex::scoped_lock lm2(dc->_mutex); + _reference_video = dc->_reference_video; _reference_audio = dc->_reference_audio; _reference_text = dc->_reference_text; |
