Small fixes to run ACM2 tests.

BUG=
R=minyue@google.com

Review URL: https://webrtc-codereview.appspot.com/2238004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4836 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
turaj@webrtc.org
2013-09-25 01:09:23 +00:00
parent ff43c85ef1
commit d6a7a5f385
3 changed files with 6 additions and 3 deletions

View File

@@ -270,7 +270,7 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
// Opus supports frames shorter than 10ms,
// but it doesn't help us to use them.
// Mono and stereo.
{1, {960}, 0, 2, false},
{4, {480, 960, 1920, 2880}, 0, 2, false},
#endif
#ifdef WEBRTC_CODEC_SPEEX
{3, {160, 320, 480}, 0, 1, false},

View File

@@ -545,6 +545,8 @@ int AcmReceiver::RemoveAllCodecs() {
}
}
}
// No codec is registered, invalidate last audio decoder.
last_audio_decoder_ = -1;
return ret_val;
}
@@ -561,6 +563,8 @@ int AcmReceiver::RemoveCodec(uint8_t payload_type) {
}
CriticalSectionScoped lock(neteq_crit_sect_);
decoders_[codec_index].registered = false;
if (last_audio_decoder_ == codec_index)
last_audio_decoder_ = -1; // Codec is removed, invalidate last decoder.
return 0;
}

View File

@@ -1536,8 +1536,7 @@ int AudioCodingModuleImpl::InitializeReceiverSafe() {
// removing and registering a decoder we can achieve the effect of resetting.
// Reset the decoder state.
int AudioCodingModuleImpl::ResetDecoder() {
CriticalSectionScoped lock(acm_crit_sect_);
return -1;
return 0;
}
// Get current receive frequency.