From 2a5cfc216792a24dfdf4afbe9936f2f9953b62a3 Mon Sep 17 00:00:00 2001 From: "jmarusic@webrtc.org" Date: Mon, 23 Feb 2015 08:52:37 +0000 Subject: [PATCH] Replaced unnecessary check with an explicit CHECK. WebRtcIlbcfix_Encode method that is called returns an error code only if a packet with more than 3 frames is passed, which is illegal. R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/36209004 Cr-Commit-Position: refs/heads/master@{#8456} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8456 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc index a279875b9..79c01ddb7 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc +++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc @@ -104,8 +104,7 @@ bool AudioEncoderIlbc::EncodeInternal(uint32_t rtp_timestamp, input_buffer_, kSampleRateHz / 100 * num_10ms_frames_per_packet_, encoded); - if (output_len == -1) - return false; // Encoding error. + CHECK_GE(output_len, 0); DCHECK_EQ(output_len, static_cast(expected_output_len)); info->encoded_bytes = output_len; info->encoded_timestamp = first_timestamp_in_buffer_;