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/single_stream_audio_content.cc | |
| parent | c157cd97740a2ba55d3e87bd9844429cc7d49ce7 (diff) | |
Fix unsafe unlocked leak of reference.
Diffstat (limited to 'src/lib/single_stream_audio_content.cc')
| -rw-r--r-- | src/lib/single_stream_audio_content.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/single_stream_audio_content.cc b/src/lib/single_stream_audio_content.cc index 3389c0557..a38ef0e1e 100644 --- a/src/lib/single_stream_audio_content.cc +++ b/src/lib/single_stream_audio_content.cc @@ -63,7 +63,9 @@ SingleStreamAudioContent::take_from_audio_examiner (shared_ptr<AudioExaminer> ex { boost::mutex::scoped_lock lm (_mutex); _audio_stream.reset (new AudioStream (examiner->audio_frame_rate(), examiner->audio_channels ())); - _audio_stream->mapping().make_default (); + AudioMapping m = _audio_stream->mapping (); + m.make_default (); + _audio_stream->set_mapping (m); } signal_changed (AudioContentProperty::AUDIO_STREAMS); |
