diff options
Diffstat (limited to 'media/audio/linux/audio_manager_linux.cc')
-rw-r--r-- | media/audio/linux/audio_manager_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc index b3d21f5..9fa4799 100644 --- a/media/audio/linux/audio_manager_linux.cc +++ b/media/audio/linux/audio_manager_linux.cc @@ -59,6 +59,12 @@ AudioManagerLinux::AudioManagerLinux() } AudioManagerLinux::~AudioManagerLinux() { + // Make sure we stop the thread first. If we let the default destructor to + // destruct the members, we may destroy audio streams before stopping the + // thread, resulting an unexpected behavior. + // This way we make sure activities of the audio streams are all stopped + // before we destroy them. + audio_thread_.Stop(); active_streams_.clear(); } |