[dom/media] Use an atomic for mInputDeviceID to avoid potential race

This commit is contained in:
Moonchild 2020-09-23 01:45:29 +00:00 committed by roytam1
commit e1b0d4eea1

View file

@ -652,7 +652,7 @@ public:
* and boolean to control if we want input/output
*/
bool mInputWanted;
int mInputDeviceID;
Atomic<int> mInputDeviceID;
bool mOutputWanted;
int mOutputDeviceID;
// Maps AudioDataListeners to a usecount of streams using the listener