static void allocate_buffers(FLACContext *s){

    int i;



    assert(s->max_blocksize);



    if(s->max_framesize == 0 && s->max_blocksize){

        s->max_framesize= (s->channels * s->bps * s->max_blocksize + 7)/ 8; //FIXME header overhead

    }



    for (i = 0; i < s->channels; i++)

    {

        s->decoded[i] = av_realloc(s->decoded[i], sizeof(int32_t)*s->max_blocksize);

    }



    s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);

}

static void allocate_buffers(FLACContext *s){

    int i;



    assert(s->max_blocksize);



    if(s->max_framesize == 0 && s->max_blocksize){

        s->max_framesize= (s->channels * s->bps * s->max_blocksize + 7)/ 8; 

    }



    for (i = 0; i < s->channels; i++)

    {

        s->decoded[i] = av_realloc(s->decoded[i], sizeof(int32_t)*s->max_blocksize);

    }



    s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);

}

static void FUNC_0(FLACContext *VAR_0){

    int VAR_1;



    assert(VAR_0->max_blocksize);



    if(VAR_0->max_framesize == 0 && VAR_0->max_blocksize){

        VAR_0->max_framesize= (VAR_0->channels * VAR_0->bps * VAR_0->max_blocksize + 7)/ 8; 

    }



    for (VAR_1 = 0; VAR_1 < VAR_0->channels; VAR_1++)

    {

        VAR_0->decoded[VAR_1] = av_realloc(VAR_0->decoded[VAR_1], sizeof(int32_t)*VAR_0->max_blocksize);

    }



    VAR_0->bitstream= av_fast_realloc(VAR_0->bitstream, &VAR_0->allocated_bitstream_size, VAR_0->max_framesize);

}

static void FUNC_0(FLACContext *VAR_0){ int VAR_1; assert(VAR_0->max_blocksize); if(VAR_0->max_framesize == 0 && VAR_0->max_blocksize){ VAR_0->max_framesize= (VAR_0->channels * VAR_0->bps * VAR_0->max_blocksize + 7)/ 8; } for (VAR_1 = 0; VAR_1 < VAR_0->channels; VAR_1++) { VAR_0->decoded[VAR_1] = av_realloc(VAR_0->decoded[VAR_1], sizeof(int32_t)*VAR_0->max_blocksize); } VAR_0->bitstream= av_fast_realloc(VAR_0->bitstream, &VAR_0->allocated_bitstream_size, VAR_0->max_framesize); }