Bug 901527: null pointer when resetting a resampler r=roc
authorRandell Jesup <rjesup@jesup.org>
Wed, 07 Aug 2013 01:36:03 -0400
changeset 141625 2f380c0d167075e6e10f7a4501d840a6b588fa4f
parent 141624 df2948e126d121e672b2f2d2b54dd6c966042992
child 141626 eb14a99fbacb1088aa1a0a0b10f84cdd9c339e72
push id25066
push userryanvm@gmail.com
push dateWed, 07 Aug 2013 18:40:50 +0000
treeherdermozilla-central@79b5c74ef97b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs901527
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 901527: null pointer when resetting a resampler r=roc
media/webrtc/trunk/webrtc/common_audio/resampler/resampler.cc
--- a/media/webrtc/trunk/webrtc/common_audio/resampler/resampler.cc
+++ b/media/webrtc/trunk/webrtc/common_audio/resampler/resampler.cc
@@ -69,16 +69,17 @@ int Resampler::ResetIfNeeded(int in_freq
 int Resampler::Reset(int in_freq, int out_freq, ResamplerType type)
 {
   uint32_t channels = (type == kResamplerSynchronousStereo ||
                        type == kResamplerFixedSynchronousStereo) ? 2 : 1;
 
   if (state_)
   {
     speex_resampler_destroy(state_);
+    state_ = NULL;
   }
   type_ = type;
   channels_ = channels;
   in_freq_ = in_freq;
   out_freq_ = out_freq;
 
   // For fixed-rate, same-rate resamples we just memcpy and so don't spin up a resampler
   if (in_freq != out_freq || !IsFixedRate())