if(track->cluster[0][0].entries != 0)   { int sSize = track->cluster[0][0].len/track->cluster[0][0].entries; put_be32(pb, sSize);  put_be32(pb, track->samples);
for (i=0; i<track->entry; i++) { int cl = i / MOV_INDEX_CLUSTER_SIZE; int id = i % MOV_INDEX_CLUSTER_SIZE; tst = track->cluster[cl][id].len; if(oldtst != -1 && tst != oldtst) { equalChunks = 0; break; } oldtst = tst;
static int mov_write_stsz_tag(ByteIOContext *pb, MOVTrack* track){    int i, size;    if(track->cluster[0][0].entries != 0)         size = 20;    else        size = 20+track->samples*4;    put_be32(pb, size); /* size */    put_tag(pb, "stsz");    put_be32(pb, 0); /* version & flags */    /* TODO: Ugly (and false) assumption: if we have a chunk of samples, assume     * all sizes are same */    if(track->cluster[0][0].entries != 0)   {        int sSize = track->cluster[0][0].len/track->cluster[0][0].entries;        put_be32(pb, sSize); /* sample size */        put_be32(pb, track->samples); /* sample count */    }    else     {        put_be32(pb, 0); /* sample size */        put_be32(pb, track->samples); /* sample count */        for (i=0; i<track->samples; i++) {            int cl = i / MOV_INDEX_CLUSTER_SIZE;            int id = i % MOV_INDEX_CLUSTER_SIZE;            put_be32(pb, track->cluster[cl][id].len);        }    }    return size;}