Set a default speech type in iSAC wrapper

If the decoder encounters an error, it may leave the speech type
unassigned, leading to a use-of-uninitialized-value in subsequent lines.

BUG=crbug/411162
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7104 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2014-09-08 13:40:58 +00:00
parent ed8bcd3ac5
commit c64246f42c

View File

@ -736,7 +736,7 @@ int ACMISAC::Decode(const uint8_t* encoded,
size_t encoded_len,
int16_t* decoded,
SpeechType* speech_type) {
int16_t temp_type;
int16_t temp_type = 1; // Default is speech.
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
int ret =
ACM_ISAC_DECODE_B(static_cast<ACM_ISAC_STRUCT*>(codec_inst_ptr_->inst),