Index: media/cast/receiver/audio_decoder_unittest.cc |
diff --git a/media/cast/receiver/audio_decoder_unittest.cc b/media/cast/receiver/audio_decoder_unittest.cc |
index 576e9dbce57ac67fb1cfe339a715ed4d5e679a4f..62e4fbbf616e0afc9485ab25a7480e1fbfbb86c3 100644 |
--- a/media/cast/receiver/audio_decoder_unittest.cc |
+++ b/media/cast/receiver/audio_decoder_unittest.cc |
@@ -35,6 +35,11 @@ class AudioDecoderTest : public ::testing::TestWithParam<TestScenario> { |
: cast_environment_(new StandaloneCastEnvironment()), |
cond_(&lock_) {} |
+ virtual ~AudioDecoderTest() { |
+ // Make sure all threads have stopped before the environment goes away. |
+ cast_environment_->Shutdown(); |
+ } |
+ |
protected: |
virtual void SetUp() OVERRIDE { |
audio_decoder_.reset(new AudioDecoder(cast_environment_, |