for (i = 0; i < s->channels; i++) { s->decoded[i] = av_realloc(s->decoded[i], sizeof(uint32_t)*s->max_blocksize); s->residual[i] = av_realloc(s->residual[i], sizeof(uint8_t)*s->max_blocksize); }
allocate_buffers(s);
static void metadata_streaminfo(FLACContext *s){    int i;    /* mandatory streaminfo */    s->min_blocksize = get_bits(&s->gb, 16);    s->max_blocksize = get_bits(&s->gb, 16);    s->min_framesize = get_bits_long(&s->gb, 24);    s->max_framesize = get_bits_long(&s->gb, 24);        s->samplerate = get_bits_long(&s->gb, 20);    s->channels = get_bits(&s->gb, 3) + 1;    s->bps = get_bits(&s->gb, 5) + 1;        s->avctx->channels = s->channels;    s->avctx->sample_rate = s->samplerate;    skip_bits(&s->gb, 36); /* total num of samples */        skip_bits(&s->gb, 64); /* md5 sum */    skip_bits(&s->gb, 64); /* md5 sum */    for (i = 0; i < s->channels; i++)    {        s->decoded[i] = av_realloc(s->decoded[i], sizeof(uint32_t)*s->max_blocksize);        s->residual[i] = av_realloc(s->residual[i], sizeof(uint8_t)*s->max_blocksize);    }}