Revision 7100d63c

View differences:

libavcodec/ac3enc.c
27 27
 */
28 28

  
29 29
//#define DEBUG
30
//#define ASSERT_LEVEL 2
30 31

  
31 32
#include "libavutil/audioconvert.h"
33
#include "libavutil/avassert.h"
32 34
#include "libavutil/crc.h"
33 35
#include "avcodec.h"
34 36
#include "put_bits.h"
......
1101 1103
        v = (v + 1) >> 1;
1102 1104
        v = (levels >> 1) - v;
1103 1105
    }
1104
    assert(v >= 0 && v < levels);
1106
    av_assert2(v >= 0 && v < levels);
1105 1107
    return v;
1106 1108
}
1107 1109

  
......
1123 1125
    m = (1 << (qbits-1));
1124 1126
    if (v >= m)
1125 1127
        v = m - 1;
1126
    assert(v >= -m);
1128
    av_assert2(v >= -m);
1127 1129
    return v & ((1 << qbits)-1);
1128 1130
}
1129 1131

  
......
1439 1441
    flush_put_bits(&s->pb);
1440 1442
    frame = s->pb.buf;
1441 1443
    pad_bytes = s->frame_size - (put_bits_ptr(&s->pb) - frame) - 2;
1442
    assert(pad_bytes >= 0);
1444
    av_assert2(pad_bytes >= 0);
1443 1445
    if (pad_bytes > 0)
1444 1446
        memset(put_bits_ptr(&s->pb), 0, pad_bytes);
1445 1447

  

Also available in: Unified diff