зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290075: Always Init() the VoiceEngine when enumerating audio inputs r=jib
This commit is contained in:
Родитель
94b1da6b55
Коммит
fd8a8c3c74
|
@ -108,7 +108,6 @@ MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
|
|||
: mMutex("mozilla::MediaEngineWebRTC"),
|
||||
mVoiceEngine(nullptr),
|
||||
mAudioInput(nullptr),
|
||||
mAudioEngineInit(false),
|
||||
mFullDuplex(aPrefs.mFullDuplex),
|
||||
mExtendedFilter(aPrefs.mExtendedFilter),
|
||||
mDelayAgnostic(aPrefs.mDelayAgnostic)
|
||||
|
@ -349,11 +348,12 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mAudioEngineInit) {
|
||||
if (ptrVoEBase->Init() < 0) {
|
||||
return;
|
||||
}
|
||||
mAudioEngineInit = true;
|
||||
// Always re-init the voice engine, since if we close the last use we
|
||||
// DeInitEngine() and Terminate(), which shuts down Process() - but means
|
||||
// we have to Init() again before using it. Init() when already inited is
|
||||
// just a no-op, so call always.
|
||||
if (ptrVoEBase->Init() < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mAudioInput) {
|
||||
|
|
|
@ -599,7 +599,6 @@ private:
|
|||
webrtc::VoiceEngine* mVoiceEngine;
|
||||
webrtc::Config mConfig;
|
||||
RefPtr<mozilla::AudioInput> mAudioInput;
|
||||
bool mAudioEngineInit;
|
||||
bool mFullDuplex;
|
||||
bool mExtendedFilter;
|
||||
bool mDelayAgnostic;
|
||||
|
|
Загрузка…
Ссылка в новой задаче