Bug 1143968 - Allow a cubeb_stream in error to be stopped without triggering a fatal assert. r=padenot
authorMatthew Gregan <kinetik@flim.org>
Wed, 18 Mar 2015 15:23:19 +1300
changeset 263547 e0d9c9cbee73a42a83dbd8d1db9b4f037debcee5
parent 263546 22f7942307c4ed9fa8f483f7073a8606af8b982f
child 263548 43f2f38859d029ce9bb238ed3dd64ea3275d61fd
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1143968
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1143968 - Allow a cubeb_stream in error to be stopped without triggering a fatal assert. r=padenot
media/libcubeb/src/cubeb_wasapi.cpp
--- a/media/libcubeb/src/cubeb_wasapi.cpp
+++ b/media/libcubeb/src/cubeb_wasapi.cpp
@@ -1236,20 +1236,17 @@ int wasapi_stream_start(cubeb_stream * s
 
 int wasapi_stream_stop(cubeb_stream * stm)
 {
   XASSERT(stm);
 
   {
     auto_lock lock(stm->stream_reset_lock);
 
-    if (!stm->client) {
-      XASSERT(!stm->thread);
-      LOG("stream already stopped\n");
-    } else {
+    if (stm->client) {
       HRESULT hr = stm->client->Stop();
       if (FAILED(hr)) {
         LOG("could not stop AudioClient\n");
         return CUBEB_ERROR;
       }
     }
 
     stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_STOPPED);