From f3a306b5bcecc2719d86091631fadc11d145a5b3 Mon Sep 17 00:00:00 2001 From: "jmarusic@webrtc.org" Date: Mon, 23 Feb 2015 15:41:30 +0000 Subject: [PATCH] g722: Enhanced documentation. Added CHECK. R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43409004 Cr-Commit-Position: refs/heads/master@{#8462} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8462 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc | 1 + .../modules/audio_coding/codecs/g722/include/g722_interface.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) 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,