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:
@@ -270,7 +270,7 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
|
|||||||
// Opus supports frames shorter than 10ms,
|
// Opus supports frames shorter than 10ms,
|
||||||
// but it doesn't help us to use them.
|
// but it doesn't help us to use them.
|
||||||
// Mono and stereo.
|
// Mono and stereo.
|
||||||
{1, {960}, 0, 2, false},
|
{4, {480, 960, 1920, 2880}, 0, 2, false},
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_CODEC_SPEEX
|
#ifdef WEBRTC_CODEC_SPEEX
|
||||||
{3, {160, 320, 480}, 0, 1, false},
|
{3, {160, 320, 480}, 0, 1, false},
|
||||||
|
|||||||
@@ -545,6 +545,8 @@ int AcmReceiver::RemoveAllCodecs() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// No codec is registered, invalidate last audio decoder.
|
||||||
|
last_audio_decoder_ = -1;
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,6 +563,8 @@ int AcmReceiver::RemoveCodec(uint8_t payload_type) {
|
|||||||
}
|
}
|
||||||
CriticalSectionScoped lock(neteq_crit_sect_);
|
CriticalSectionScoped lock(neteq_crit_sect_);
|
||||||
decoders_[codec_index].registered = false;
|
decoders_[codec_index].registered = false;
|
||||||
|
if (last_audio_decoder_ == codec_index)
|
||||||
|
last_audio_decoder_ = -1; // Codec is removed, invalidate last decoder.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1536,8 +1536,7 @@ int AudioCodingModuleImpl::InitializeReceiverSafe() {
|
|||||||
// removing and registering a decoder we can achieve the effect of resetting.
|
// removing and registering a decoder we can achieve the effect of resetting.
|
||||||
// Reset the decoder state.
|
// Reset the decoder state.
|
||||||
int AudioCodingModuleImpl::ResetDecoder() {
|
int AudioCodingModuleImpl::ResetDecoder() {
|
||||||
CriticalSectionScoped lock(acm_crit_sect_);
|
return 0;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get current receive frequency.
|
// Get current receive frequency.
|
||||||
|
|||||||
Reference in New Issue
Block a user