diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-27 15:05:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-27 15:23:13 +0200 |
commit | 3adf054b22d63953340a54136b46b07a1fa42798 (patch) | |
tree | f377bd68188b1648039d06d79a861fe0b25d3e4b /libavcodec/vorbisenc.c | |
parent | 5e763920a44f85251807d5a5d998a67fb98e32c1 (diff) | |
download | ffmpeg-3adf054b22d63953340a54136b46b07a1fa42798.tar.gz |
avcodec/vorbisenc: change 6 asserts to av_asserts()
speed relevant ones use av_assert2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbisenc.c')
-rw-r--r-- | libavcodec/vorbisenc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index dddbca0781..1af76d4811 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -140,9 +140,9 @@ typedef struct { static inline int put_codeword(PutBitContext *pb, vorbis_enc_codebook *cb, int entry) { - assert(entry >= 0); - assert(entry < cb->nentries); - assert(cb->lens[entry]); + av_assert2(entry >= 0); + av_assert2(entry < cb->nentries); + av_assert2(cb->lens[entry]); if (pb->size_in_bits - put_bits_count(pb) < cb->lens[entry]) return AVERROR(EINVAL); put_bits(pb, cb->lens[entry], cb->codewords[entry]); @@ -198,7 +198,7 @@ static int ready_codebook(vorbis_enc_codebook *cb) static int ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc) { int i; - assert(rc->type == 2); + av_assert0(rc->type == 2); rc->maxes = av_mallocz(sizeof(float[2]) * rc->classifications); if (!rc->maxes) return AVERROR(ENOMEM); @@ -878,8 +878,8 @@ static int residue_encode(vorbis_enc_context *venc, vorbis_enc_residue *rc, int classes[MAX_CHANNELS][NUM_RESIDUE_PARTITIONS]; int classwords = venc->codebooks[rc->classbook].ndimensions; - assert(rc->type == 2); - assert(real_ch == 2); + av_assert0(rc->type == 2); + av_assert0(real_ch == 2); for (p = 0; p < partitions; p++) { float max1 = 0.0, max2 = 0.0; int s = rc->begin + p * psize; |