summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/ppb_audio_shared.cc
diff options
context:
space:
mode:
authornfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-25 00:22:52 +0000
committernfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-25 00:22:52 +0000
commit7b388d13ee6426d341a4543954318147b6eac17b (patch)
tree8f08504ed2f15c7a3b310eaad87e1276b655164e /ppapi/shared_impl/ppb_audio_shared.cc
parenta24e984c2214b9cf21748e4165ba49c5327caff1 (diff)
downloadchromium_src-7b388d13ee6426d341a4543954318147b6eac17b.zip
chromium_src-7b388d13ee6426d341a4543954318147b6eac17b.tar.gz
chromium_src-7b388d13ee6426d341a4543954318147b6eac17b.tar.bz2
Fix back-to-back StartPlayback/StopPlayback issue in PPAPI IPC proxy
where subsequent StartPlayback on the same audio device was not triggering audio callbacks. BUG=144037 TEST=updated test included Review URL: https://chromiumcodereview.appspot.com/10868034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/ppb_audio_shared.cc')
-rw-r--r--ppapi/shared_impl/ppb_audio_shared.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ppapi/shared_impl/ppb_audio_shared.cc b/ppapi/shared_impl/ppb_audio_shared.cc
index 5cf3002..d131bb3 100644
--- a/ppapi/shared_impl/ppb_audio_shared.cc
+++ b/ppapi/shared_impl/ppb_audio_shared.cc
@@ -29,6 +29,9 @@ PPB_Audio_Shared::PPB_Audio_Shared()
}
PPB_Audio_Shared::~PPB_Audio_Shared() {
+ // Shut down the socket to escape any hanging |Receive|s.
+ if (socket_.get())
+ socket_->Shutdown();
StopThread();
}
@@ -105,10 +108,7 @@ void PPB_Audio_Shared::StartThread() {
}
void PPB_Audio_Shared::StopThread() {
- // Shut down the socket to escape any hanging |Receive|s.
- if (socket_.get())
- socket_->Shutdown();
- #if !defined(OS_NACL)
+#if !defined(OS_NACL)
if (audio_thread_.get()) {
audio_thread_->Join();
audio_thread_.reset();