RTC_CHECK and RTC_DCHECK macros for C

So that we don't have to use assert(). Includes one sample call site.

NOTRY=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2262173002
Cr-Commit-Position: refs/heads/master@{#13862}
This commit is contained in:
kwiberg
2016-08-23 05:54:25 -07:00
committed by Commit bot
parent 792469709d
commit 2e486462e0
3 changed files with 62 additions and 7 deletions

View File

@ -9,9 +9,10 @@
*/
#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@ -51,7 +52,7 @@ int16_t WebRtcOpus_EncoderCreate(OpusEncInst** inst,
}
OpusEncInst* state = calloc(1, sizeof(OpusEncInst));
assert(state);
RTC_DCHECK(state);
int error;
state->encoder = opus_encoder_create(48000, (int)channels, opus_app,