зеркало из https://github.com/mozilla/gecko-dev.git
ec036851de
There are three potential data-race operations that may run at the same time: 1. Data callback and stream reinitialization 2. Data callback and stream destroying 3. Stream reinitialization and stream destroying The case 1 and 2 won't happen as long as the AudioOutputUnitStop is called at the beginning of stream reinitialization and stream destorying. The AudioOutputUnitStop requires to lock a mutex inside CoreAudio framework that is also used by the data callback. Thus, if there is a running callback, which holds the mutex inside CoreAudio framework, when AudioOutputUnitStop is called, then the calling will block the current thread until the data callback ends since it is waiting for the mutex. By calling AudioOutputUnitStop at the beginning of the stream reinitialization and stream destroying, the data race of case 1 and 2 can be avoided. On the other hand, the case 3 won't happen since the stream initialization and destroying is run on the same task queue. The two tasks on the same serial task queue are impossible to be run at the same time. The mutex in AudioUnitStream is unnecessary because it's used for the case 3. Differential Revision: https://phabricator.services.mozilla.com/D34076 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
audioipc | ||
ffvpx | ||
gmp-clearkey/0.1 | ||
kiss_fft | ||
libaom | ||
libcubeb | ||
libdav1d | ||
libjpeg | ||
libmkv | ||
libnestegg | ||
libogg | ||
libopus | ||
libpng | ||
libsoundtouch | ||
libspeex_resampler | ||
libtheora | ||
libtremor | ||
libvorbis | ||
libvpx | ||
libwebp | ||
libyuv | ||
mp4parse-rust | ||
mtransport | ||
openmax_dl | ||
openmax_il/il112 | ||
psshparser | ||
webrtc | ||
moz.build | ||
update-libjpeg.sh |