commit | c64246f42cabeeb13d1188df61398f231068ff39 | [log] [tgz] |
---|---|---|
author | henrik.lundin@webrtc.org <henrik.lundin@webrtc.org> | Mon Sep 08 13:40:58 2014 +0000 |
committer | henrik.lundin@webrtc.org <henrik.lundin@webrtc.org> | Mon Sep 08 13:40:58 2014 +0000 |
tree | f64157dda6a0a2b17aeaef09645c7f1e9cbfc8d9 | |
parent | ed8bcd3ac5f633e7bd9916ac727fb1f9c0c39697 [diff] |
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
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc index 2adae86..e122559 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc
@@ -736,7 +736,7 @@ 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),