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; }