Microphones are enumerated twice when cameras are enumerated
Categories
(Core :: Audio/Video, defect)
Tracking
()
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
MediaManager::EnumerateRawDevices tries to reuse the microphone list for camera groupId correlation when audio and video use the same backend (micsOfVideoBackend). Since bug 1528042 moved microphone enumeration before cameras, audioBackend == videoBackend is evaluated before videoBackend is assigned, so it is always false and the microphones are enumerated a second time for every camera enumeration (enumerateDevices(), getUserMedia()).
Fix: pick videoBackend before the audio block. The existing MOZ_ASSERT on the forced microphone name in the reuse path holds, because both names come from the same media.audio_loopback_dev read.
Performance only. Found by Coverity Scan (CID 1559893, reported as a dereference after null check).
| Assignee | ||
Comment 1•2 days ago
|
||
Since microphones are enumerated before cameras, audioBackend was
compared with a still-null videoBackend, so the microphone list was never
reused for camera groupId correlation and was enumerated a second time.
Updated•2 days ago
|
Comment 2•2 days ago
|
||
Set release status flags based on info from the regressing bug 1528042
Updated•2 days ago
|
Updated•2 days ago
|
Description
•