Add missing lock.
authorCarl Hetherington <cth@carlh.net>
Tue, 1 Dec 2020 10:24:41 +0000 (11:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 1 Dec 2020 10:24:41 +0000 (11:24 +0100)
src/lib/video_ring_buffers.cc

index bfec507ea4f84a5b22e82271e5966e33e9771e2a..e0e1b052c3f6832edbc3e424f583223b4df3b584 100644 (file)
@@ -77,6 +77,7 @@ VideoRingBuffers::clear ()
 pair<size_t, string>
 VideoRingBuffers::memory_used () const
 {
+       boost::mutex::scoped_lock lm (_mutex);
        size_t m = 0;
        for (list<pair<shared_ptr<PlayerVideo>, DCPTime> >::const_iterator i = _data.begin(); i != _data.end(); ++i) {
                m += i->first->memory_used();