Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: media/audio/win/wavein_input_win.h

Issue 12092064: Avoids crash in PCMWaveInAudioInputStream::WaveCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: nit Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/wavein_input_win.h
===================================================================
--- media/audio/win/wavein_input_win.h (revision 179519)
+++ media/audio/win/wavein_input_win.h (working copy)
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/synchronization/lock.h"
#include "base/win/scoped_handle.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
@@ -116,6 +117,9 @@
// An event that is signaled when the callback thread is ready to stop.
base::win::ScopedHandle stopped_event_;
+ // Lock used to avoid conflicts when Stop() is called during a callback.
+ base::Lock lock_;
+
DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream);
};
« no previous file with comments | « no previous file | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698