Revision cf3ac543 libavcodec/vorbis.c

View differences:

libavcodec/vorbis.c
51 51
// the two bits[p] > 32 checks should be redundant, all calling code should
52 52
// already ensure that, but since it allows overwriting the stack it seems
53 53
// reasonable to check redundantly.
54
int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
54
int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
55 55
{
56 56
    uint_fast32_t exit_at_level[33] = {
57 57
        404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
58 58
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
59 59

  
60
    uint_fast8_t i, j;
61
    uint_fast32_t code, p;
60
    unsigned i, j, p, code;
62 61

  
63 62
#ifdef V_DEBUG
64 63
    GetBitContext gb;
......
78 77
        exit_at_level[i+1] = 1 << i;
79 78

  
80 79
#ifdef V_DEBUG
81
    av_log(NULL, AV_LOG_INFO, " %d. of %d code len %d code %d - ", p, num, bits[p], codes[p]);
82
    init_get_bits(&gb, (uint_fast8_t *)&codes[p], bits[p]);
80
    av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]);
81
    init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
83 82
    for (i = 0; i < bits[p]; ++i)
84 83
        av_log(NULL, AV_LOG_INFO, "%s", get_bits1(&gb) ? "1" : "0");
85 84
    av_log(NULL, AV_LOG_INFO, "\n");

Also available in: Unified diff