Revision 4c4e7465 libavcodec/bitstream.c

View differences:

libavcodec/bitstream.c
158 158
#endif
159 159
        /* if code matches the prefix, it is in the table */
160 160
        n -= n_prefix;
161
        if (n > 0) {
161 162
        if(flags & INIT_VLC_LE)
162 163
            code_prefix2= code & (n_prefix>=32 ? 0xffffffff : (1 << n_prefix)-1);
163 164
        else
164 165
            code_prefix2= code >> n;
165
        if (n > 0 && code_prefix2 == code_prefix) {
166
        if (code_prefix2 == code_prefix) {
166 167
            if (n <= table_nb_bits) {
167 168
                /* no need to add another table */
168 169
                j = (code << (table_nb_bits - n)) & (table_size - 1);
......
196 197
                table[j][1] = -n1; //bits
197 198
            }
198 199
        }
200
        }
199 201
    }
200 202

  
201 203
    /* second pass : fill auxillary tables recursively */

Also available in: Unified diff