From b255865e6e9d4899a0dbd3fed1abca89493192ed Mon Sep 17 00:00:00 2001 From: "jmarusic@webrtc.org" Date: Wed, 18 Feb 2015 15:02:27 +0000 Subject: [PATCH] The PCM codecs can never fail, so we don't need to check the return value R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37329004 Cr-Commit-Position: refs/heads/master@{#8413} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8413 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc index ceef06dc62..27c3e6ace3 100644 --- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc +++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc @@ -78,11 +78,10 @@ bool AudioEncoderPcm::EncodeInternal(uint32_t rtp_timestamp, } CHECK_EQ(speech_buffer_.size(), static_cast(full_frame_samples_)); int16_t ret = EncodeCall(&speech_buffer_[0], full_frame_samples_, encoded); + DCHECK_GE(ret, 0); speech_buffer_.clear(); info->encoded_timestamp = first_timestamp_in_buffer_; info->payload_type = payload_type_; - if (ret < 0) - return false; info->encoded_bytes = static_cast(ret); return true; }