static void build_chunks(MOVTrack *trk)

{

    int i;

    MOVIentry *chunk= &trk->cluster[0];

    uint64_t chunkSize = chunk->size;

    chunk->chunkNum= 1;

    trk->chunkCount= 1;

    for(i=1; i<trk->entry; i++){

        if(chunk->pos + chunkSize == trk->cluster[i].pos){

            chunkSize             += trk->cluster[i].size;

            chunk->samplesInChunk += trk->cluster[i].entries;

        }else{

            trk->cluster[i].chunkNum = chunk->chunkNum+1;

            chunk=&trk->cluster[i];

            chunkSize = chunk->size;

            trk->chunkCount++;

        }

    }

}

static void build_chunks(MOVTrack *trk)

{

    int i;

    MOVIentry *chunk= &trk->cluster[0];

    uint64_t chunkSize = chunk->size;

    chunk->chunkNum= 1;

    trk->chunkCount= 1;

    for(i=1; i<trk->entry; i++){

        if(chunk->pos + chunkSize == trk->cluster[i].pos){

            chunkSize             += trk->cluster[i].size;

            chunk->samplesInChunk += trk->cluster[i].entries;

        }else{

            trk->cluster[i].chunkNum = chunk->chunkNum+1;

            chunk=&trk->cluster[i];

            chunkSize = chunk->size;

            trk->chunkCount++;

        }

    }

}

static void FUNC_0(MOVTrack *VAR_0)

{

    int VAR_1;

    MOVIentry *chunk= &VAR_0->cluster[0];

    uint64_t chunkSize = chunk->size;

    chunk->chunkNum= 1;

    VAR_0->chunkCount= 1;

    for(VAR_1=1; VAR_1<VAR_0->entry; VAR_1++){

        if(chunk->pos + chunkSize == VAR_0->cluster[VAR_1].pos){

            chunkSize             += VAR_0->cluster[VAR_1].size;

            chunk->samplesInChunk += VAR_0->cluster[VAR_1].entries;

        }else{

            VAR_0->cluster[VAR_1].chunkNum = chunk->chunkNum+1;

            chunk=&VAR_0->cluster[VAR_1];

            chunkSize = chunk->size;

            VAR_0->chunkCount++;

        }

    }

}

static void FUNC_0(MOVTrack *VAR_0)
{ int VAR_1; MOVIentry *chunk= &VAR_0->cluster[0]; uint64_t chunkSize = chunk->size; chunk->chunkNum= 1; VAR_0->chunkCount= 1; for(VAR_1=1; VAR_1<VAR_0->entry; VAR_1++){ if(chunk->pos + chunkSize == VAR_0->cluster[VAR_1].pos){ chunkSize             += VAR_0->cluster[VAR_1].size; chunk->samplesInChunk += VAR_0->cluster[VAR_1].entries; }else{ VAR_0->cluster[VAR_1].chunkNum = chunk->chunkNum+1; chunk=&VAR_0->cluster[VAR_1]; chunkSize = chunk->size; VAR_0->chunkCount++; } } }