Closed Bug 1449178 Opened 2 years ago Closed 2 years ago

MediaEngineWebRTC doesn't clear device IDs while updating device list if GetCubebContext fails

Categories

(Core :: WebRTC: Audio/Video, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

Details

Attachments

(1 file)

MediaEngineWebRTC.cpp's AudioInputCubeb::UpdateDeviceList()[0] currently early returns immediately if it fails to retrieve a cubeb context. This means it never hits the code that unmaps device IDs. This is not an issue if a device list was never built, but in the case where a device list has been created prior, it means we may end up with a stale list that we could continue to attempt to use despite not having a cubeb context.

I suggest we clear the ID mapping before checking for the cubeb context. Patch to follow shortly.

[0]: https://searchfox.org/mozilla-central/source/dom/media/webrtc/MediaEngineWebRTC.cpp#45
Assignee: nobody → bvandyk
Blocks: 1443525
Status: NEW → ASSIGNED
Summary: MediaEngineWebRTC doesn't clear device IDs if GetCubebContext fails → MediaEngineWebRTC doesn't clear device IDs while updating device list if GetCubebContext fails
Comment on attachment 8962716 [details]
Bug 1449178 - MediaEngineWebRTC now clears device indicies while updating before checking cubeb.

https://reviewboard.mozilla.org/r/231588/#review237120
Attachment #8962716 - Flags: review?(padenot) → review+
Rank: 15
Priority: -- → P2
Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b07488c40ce
MediaEngineWebRTC now clears device indicies while updating before checking cubeb. r=padenot
https://hg.mozilla.org/mozilla-central/rev/6b07488c40ce
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.