tst = track->cluster[cl][id].len; if(oldtst != -1 && tst != oldtst) { equalChunks = 0; break;
tst = track->cluster[cl][id].size/track->cluster[cl][id].entries; if(oldtst != -1 && tst != oldtst) { equalChunks = 0;
static int mov_write_stsz_tag(ByteIOContext *pb, MOVTrack* track){    int equalChunks = 1;    int i, tst = -1, oldtst = -1;    int pos = url_ftell(pb);    put_be32(pb, 0); /* size */    put_tag(pb, "stsz");    put_be32(pb, 0); /* version & flags */    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;    }    if(equalChunks ||       track->enc->codec_type == CODEC_TYPE_AUDIO) {        //int sSize = track->cluster[0][0].len/track->cluster[0][0].entries;        int sSize = track->cluster[0][0].len;        put_be32(pb, sSize); // sample size         put_be32(pb, track->samples/track->enc->channels); // sample count     }    else {        put_be32(pb, 0); // sample size         put_be32(pb, track->entry); // sample count         for (i=0; i<track->entry; i++) {            int cl = i / MOV_INDEX_CLUSTER_SIZE;            int id = i % MOV_INDEX_CLUSTER_SIZE;            put_be32(pb, track->cluster[cl][id].len);        }    }    return updateSize (pb, pos);}