Revision fe4ff07a

View differences:

libavcodec/adpcm.c
1274 1274
    {
1275 1275
        GetBitContext gb;
1276 1276
        const int *table;
1277
        int k0, signmask, nb_bits;
1277
        int k0, signmask, nb_bits, count;
1278 1278
        int size = buf_size*8;
1279 1279

  
1280 1280
        init_get_bits(&gb, buf, size);
......
1286 1286
        k0 = 1 << (nb_bits-2);
1287 1287
        signmask = 1 << (nb_bits-1);
1288 1288

  
1289
        while (get_bits_count(&gb) <= size - 22*avctx->channels) {
1289 1290
        for (i = 0; i < avctx->channels; i++) {
1290 1291
            *samples++ = c->status[i].predictor = get_sbits(&gb, 16);
1291 1292
            c->status[i].step_index = get_bits(&gb, 6);
1292 1293
        }
1293 1294

  
1294
        while (get_bits_count(&gb) < size)
1295
        for (count = 0; get_bits_count(&gb) <= size - nb_bits*avctx->channels && count < 4095; count++)
1295 1296
        {
1296 1297
            int i;
1297 1298

  
......
1327 1328
                }
1328 1329
            }
1329 1330
        }
1331
        }
1330 1332
        src += buf_size;
1331 1333
        break;
1332 1334
    }

Also available in: Unified diff