diff --git a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc index 89cd9ead7..7a2ec6288 100644 --- a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc +++ b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc @@ -101,6 +101,7 @@ bool AudioEncoderG722::EncodeInternal(uint32_t rtp_timestamp, const int encoded = WebRtcG722_Encode( encoders_[i].encoder, encoders_[i].speech_buffer.get(), samples_per_channel, encoders_[i].encoded_buffer.get()); + CHECK_GE(encoded, 0); CHECK_EQ(encoded, samples_per_channel / 2); } diff --git a/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h b/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h index d4b35678e..7fe11a7eb 100644 --- a/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h +++ b/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h @@ -91,8 +91,7 @@ int16_t WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst); * Output: * - encoded : The encoded data vector * - * Return value : >0 - Length (in bytes) of coded data - * -1 - Error + * Return value : Length (in bytes) of coded data */ int16_t WebRtcG722_Encode(G722EncInst* G722enc_inst,