diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-02 15:22:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-02 15:22:24 +0100 |
| commit | f89be8d79f4fe02be688b3cb3d1cc4e8c1aad26a (patch) | |
| tree | 0f764072ebfcb5a4e015d23dcd2b0595891300a6 /src/lib/audio_stream.h | |
| parent | c157cd97740a2ba55d3e87bd9844429cc7d49ce7 (diff) | |
Fix unsafe unlocked leak of reference.
Diffstat (limited to 'src/lib/audio_stream.h')
| -rw-r--r-- | src/lib/audio_stream.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/audio_stream.h b/src/lib/audio_stream.h index b3b203b39..ea6c54ead 100644 --- a/src/lib/audio_stream.h +++ b/src/lib/audio_stream.h @@ -34,16 +34,11 @@ public: void set_mapping (AudioMapping mapping); void set_frame_rate (int frame_rate); - AudioMapping const & mapping () const { + AudioMapping mapping () const { boost::mutex::scoped_lock lm (_mutex); return _mapping; } - AudioMapping & mapping () { - boost::mutex::scoped_lock lm (_mutex); - return _mapping; - } - int frame_rate () const { boost::mutex::scoped_lock lm (_mutex); return _frame_rate; |
