alloy: Fix audio capturer crash on exit (fixes #3689)

This commit is contained in:
pkv
2024-05-21 17:58:13 +00:00
committed by Marshall Greenblatt
parent 3ccd305f6d
commit e997249d53
2 changed files with 12 additions and 6 deletions

View File

@@ -117,7 +117,10 @@ void CefAudioCapturer::OnCaptureError(
media::AudioCapturerSource::ErrorCode code,
const std::string& message) {
audio_handler_->OnAudioStreamError(browser_, message);
StopStream();
if (code != media::AudioCapturerSource::ErrorCode::kSocketError) {
StopStream();
}
}
void CefAudioCapturer::StopStream() {