Possible divide by 0 in ACM.

BUG=https://code.google.com/p/webrtc/issues/detail?id=1551
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4291 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org 2013-07-03 12:00:14 +00:00
parent b1698ab827
commit f6f033f8bd

View File

@ -3055,7 +3055,8 @@ void AudioCodingModuleImpl::UpdateBufferingSafe(const WebRtcRTPHeader& rtp_info,
const int in_sample_rate_khz =
(ACMCodecDB::database_[current_receive_codec_idx_].plfreq / 1000);
if (first_payload_received_ &&
rtp_info.header.timestamp > last_incoming_send_timestamp_) {
rtp_info.header.timestamp > last_incoming_send_timestamp_ &&
in_sample_rate_khz > 0) {
accumulated_audio_ms_ += (rtp_info.header.timestamp -
last_incoming_send_timestamp_) / in_sample_rate_khz;
}