diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h index c5982f5be6..65c5b90300 100644 --- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h +++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h @@ -145,8 +145,9 @@ AudioEncoder::EncodedInfo AudioEncoderDecoderIsacT::EncodeInternal( { CriticalSectionScoped cs(state_lock_.get()); r = T::Encode(isac_state_, audio, encoded); + CHECK_GE(r, 0) << "Encode failed (error code " + << T::GetErrorCode(isac_state_) << ")"; } - CHECK_GE(r, 0); // T::Encode doesn't allow us to tell it the size of the output // buffer. All we can do is check for an overrun after the fact.