| Index: media/audio/pulse/pulse_output.cc
|
| diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc
|
| index 3aef9476720106208a92be3cab41ee5e4df0a81b..b5c2d2efb774f93426e76a9265707b7af423a8a9 100644
|
| --- a/media/audio/pulse/pulse_output.cc
|
| +++ b/media/audio/pulse/pulse_output.cc
|
| @@ -227,6 +227,9 @@ void PulseAudioOutputStream::Stop() {
|
| void PulseAudioOutputStream::SetVolume(double volume) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| + // Waiting for the main loop lock will ensure outstanding callbacks have
|
| + // completed and |volume_| is not accessed from them.
|
| + AutoPulseLock auto_lock(pa_mainloop_);
|
| volume_ = static_cast<float>(volume);
|
| }
|
|
|
|
|