Bug 1683822 - Unregister the device changed callback before destroying an AudioCallbackDriver. r=pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D101178
This commit is contained in:
Paul Adenot 2021-03-24 10:25:45 +00:00
Родитель 2400d86309
Коммит a28db97351
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -791,6 +791,9 @@ void AudioCallbackDriver::Shutdown() {
LOG(LogLevel::Debug,
("%p: Releasing audio driver off main thread (GraphDriver::Shutdown).",
Graph()));
cubeb_stream_register_device_changed_callback(mAudioStream, nullptr);
RefPtr<AsyncCubebTask> releaseEvent =
new AsyncCubebTask(this, AsyncCubebOperation::SHUTDOWN);
releaseEvent->Dispatch(NS_DISPATCH_SYNC);