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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user