Commit 63fe6444 authored by henrika@chromium.org's avatar henrika@chromium.org

Fixes crash in AudioInputVolumeTest.InputVolumeTest.

My CL  https://codereview.chromium.org/15563004 broke this test.

http://build.chromium.org/p/chromium.memory.fyi/
Failure notification for "memory test: media" on "Chromium Mac (valgrind)(1)".
Please see if the failures are related to your commit and take appropriate actions (e.g. revert, update suppressions, notify sheriff, etc.).

http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%281%29/builds/20942

Revision: 202536, 202537, 202538, 202540, 202541, 202542
Blame list: eseidel@chromium.org,glider@chromium.org,henrika@chromium.org,kinuko@chromium.org,mtomasz@chromium.org,tzik@chromium.org

BUG=see details above
TEST=media_unittests --gtest_filter=AudioInputVolumeTest.InputVolumeTest* in Debug mode on device with audio hardware
R=xians@chromium.org

Review URL: https://codereview.chromium.org/15688007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202557 0039d316-1c4b-4281-b951-d872f2087c98
parent a2c8c178
......@@ -149,7 +149,10 @@ class MEDIA_EXPORT AgcAudioStream : public AudioInterface {
// Range is normalized to [0.0,1.0] or [0.0, 1.5] on Linux.
void QueryAndStoreNewMicrophoneVolume() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(timer_.IsRunning());
// Avoid updating the volume member if AGC is not running.
if (!timer_.IsRunning())
return;
// Cach the maximum volume if this is the first time we ask for it.
if (max_volume_ == 0.0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment