summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_output_device.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 21:17:51 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 21:17:51 +0000
commit26ccdca18a79c28df69139580765e506fe7adeab (patch)
treea6e289982d17267067f7bbf6ba9c0945d31d79ec /media/audio/audio_output_device.h
parent601631d9301ec77d19ee009adfe7dfd62a819668 (diff)
downloadchromium_src-26ccdca18a79c28df69139580765e506fe7adeab.zip
chromium_src-26ccdca18a79c28df69139580765e506fe7adeab.tar.gz
chromium_src-26ccdca18a79c28df69139580765e506fe7adeab.tar.bz2
Prevent AudioDeviceThread from starting if clients have called Stop() (round 2).
My first attempt at a fix (r157378) was no good as it's legal to repeatedly start and stop an AudioOutputDevice. This time around we use flag to track a pending stop so we don't start AudioDeviceThread knowing the client had requested a stop. BUG=147499 Review URL: https://chromiumcodereview.appspot.com/10958004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output_device.h')
-rw-r--r--media/audio/audio_output_device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/audio/audio_output_device.h b/media/audio/audio_output_device.h
index ed270ab..fe4459c 100644
--- a/media/audio/audio_output_device.h
+++ b/media/audio/audio_output_device.h
@@ -160,6 +160,14 @@ class MEDIA_EXPORT AudioOutputDevice
AudioDeviceThread audio_thread_;
scoped_ptr<AudioOutputDevice::AudioThreadCallback> audio_callback_;
+ // Temporary hack to ignore OnStreamCreated() due to the user calling Stop()
+ // so we don't start the audio thread pointing to a potentially freed
+ // |callback_|.
+ //
+ // TODO(scherkus): Replace this by changing AudioRendererSink to either accept
+ // the callback via Start(). See http://crbug.com/151051 for details.
+ bool stopping_hack_;
+
DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice);
};