static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)

{

    AVStream *st = c->fc->streams[c->fc->nb_streams-1];

    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;

    int entries, i;



    print_atom("stsz", atom);



    get_byte(pb); /* version */

    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */



    sc->sample_size = get_be32(pb);

    entries = get_be32(pb);

    sc->sample_count = entries;

#ifdef DEBUG

    av_log(NULL, AV_LOG_DEBUG, "sample_size = %ld sample_count = %ld\n", sc->sample_size, sc->sample_count);

#endif

    if(sc->sample_size)

        return 0; /* there isn't any table following */

    sc->sample_sizes = (long*) av_malloc(entries * sizeof(long));

    if (!sc->sample_sizes)

        return -1;

    for(i=0; i<entries; i++) {

        sc->sample_sizes[i] = get_be32(pb);

#ifdef DEBUG

/*        av_log(NULL, AV_LOG_DEBUG, "sample_sizes[]=%ld\n", sc->sample_sizes[i]); */

#endif

    }

    return 0;

}

static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)

{

    AVStream *st = c->fc->streams[c->fc->nb_streams-1];

    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;

    int entries, i;



    print_atom("stsz", atom);



    get_byte(pb); 

    get_byte(pb); get_byte(pb); get_byte(pb); 



    sc->sample_size = get_be32(pb);

    entries = get_be32(pb);

    sc->sample_count = entries;

#ifdef DEBUG

    av_log(NULL, AV_LOG_DEBUG, "sample_size = %ld sample_count = %ld\n", sc->sample_size, sc->sample_count);

#endif

    if(sc->sample_size)

        return 0; 

    sc->sample_sizes = (long*) av_malloc(entries * sizeof(long));

    if (!sc->sample_sizes)

        return -1;

    for(i=0; i<entries; i++) {

        sc->sample_sizes[i] = get_be32(pb);

#ifdef DEBUG



#endif

    }

    return 0;

}

    int entries, i;     int entries, i;     int entries, i;     int entries, i;     int entries, i;
static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOV_atom_t VAR_2)

{

    AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];

    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;

    int VAR_3, VAR_4;



    print_atom("stsz", VAR_2);



    get_byte(VAR_1); 

    get_byte(VAR_1); get_byte(VAR_1); get_byte(VAR_1); 



    sc->sample_size = get_be32(VAR_1);

    VAR_3 = get_be32(VAR_1);

    sc->sample_count = VAR_3;

#ifdef DEBUG

    av_log(NULL, AV_LOG_DEBUG, "sample_size = %ld sample_count = %ld\n", sc->sample_size, sc->sample_count);

#endif

    if(sc->sample_size)

        return 0; 

    sc->sample_sizes = (long*) av_malloc(VAR_3 * sizeof(long));

    if (!sc->sample_sizes)

        return -1;

    for(VAR_4=0; VAR_4<VAR_3; VAR_4++) {

        sc->sample_sizes[VAR_4] = get_be32(VAR_1);

#ifdef DEBUG



#endif

    }

    return 0;

}

static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOV_atom_t VAR_2)
{ AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1]; MOVStreamContext *sc = (MOVStreamContext *)st->priv_data; int VAR_3, VAR_4; print_atom("stsz", VAR_2); get_byte(VAR_1); get_byte(VAR_1); get_byte(VAR_1); get_byte(VAR_1); sc->sample_size = get_be32(VAR_1); VAR_3 = get_be32(VAR_1); sc->sample_count = VAR_3; #ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "sample_size = %ld sample_count = %ld\n", sc->sample_size, sc->sample_count); #endif
if(sc->sample_size)
return 0; sc->sample_sizes = (long*) av_malloc(VAR_3 * sizeof(long)); if (!sc->sample_sizes)
return -1; for(VAR_4=0; VAR_4<VAR_3; VAR_4++) { sc->sample_sizes[VAR_4] = get_be32(VAR_1); #ifdef DEBUG
#endif
} return 0; }