Bug 1143968 - Allow a cubeb_stream in error to be stopped without triggering a fatal assert. r=padenot

This commit is contained in:
Matthew Gregan 2015-03-18 15:23:19 +13:00
parent f514ac0fac
commit 7c58f24efc

View File

@ -1241,10 +1241,7 @@ int wasapi_stream_stop(cubeb_stream * stm)
{ {
auto_lock lock(stm->stream_reset_lock); auto_lock lock(stm->stream_reset_lock);
if (!stm->client) { if (stm->client) {
XASSERT(!stm->thread);
LOG("stream already stopped\n");
} else {
HRESULT hr = stm->client->Stop(); HRESULT hr = stm->client->Stop();
if (FAILED(hr)) { if (FAILED(hr)) {
LOG("could not stop AudioClient\n"); LOG("could not stop AudioClient\n");