static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom)

{

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

    MOVStreamContext *sc = st->priv_data;

    unsigned int i, entries;



    get_byte(pb); /* version */

    get_be24(pb); /* flags */



    entries = get_be32(pb);



    dprintf(c->fc, "keyframe_count = %d\n", entries);



    if(entries >= UINT_MAX / sizeof(int))

        return -1;

    sc->keyframes = av_malloc(entries * sizeof(int));

    if (!sc->keyframes)

        return AVERROR(ENOMEM);

    sc->keyframe_count = entries;



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

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

        //dprintf(c->fc, "keyframes[]=%d\n", sc->keyframes[i]);

    }

    return 0;

}

static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom)

{

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

    MOVStreamContext *sc = st->priv_data;

    unsigned int i, entries;



    get_byte(pb); 

    get_be24(pb); 



    entries = get_be32(pb);



    dprintf(c->fc, "keyframe_count = %d\n", entries);



    if(entries >= UINT_MAX / sizeof(int))

        return -1;

    sc->keyframes = av_malloc(entries * sizeof(int));

    if (!sc->keyframes)

        return AVERROR(ENOMEM);

    sc->keyframe_count = entries;



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

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

        

    }

    return 0;

}

static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)

{

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

    MOVStreamContext *sc = st->priv_data;

    unsigned int VAR_3, VAR_4;



    get_byte(VAR_1); 

    get_be24(VAR_1); 



    VAR_4 = get_be32(VAR_1);



    dprintf(VAR_0->fc, "keyframe_count = %d\n", VAR_4);



    if(VAR_4 >= UINT_MAX / sizeof(int))

        return -1;

    sc->keyframes = av_malloc(VAR_4 * sizeof(int));

    if (!sc->keyframes)

        return AVERROR(ENOMEM);

    sc->keyframe_count = VAR_4;



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

        sc->keyframes[VAR_3] = get_be32(VAR_1);

        

    }

    return 0;

}

static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{ AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int VAR_3, VAR_4; get_byte(VAR_1); get_be24(VAR_1); VAR_4 = get_be32(VAR_1); dprintf(VAR_0->fc, "keyframe_count = %d\n", VAR_4); if(VAR_4 >= UINT_MAX / sizeof(int))
return -1; sc->keyframes = av_malloc(VAR_4 * sizeof(int)); if (!sc->keyframes)
return AVERROR(ENOMEM); sc->keyframe_count = VAR_4; for(VAR_3=0; VAR_3<VAR_4; VAR_3++) { sc->keyframes[VAR_3] = get_be32(VAR_1); } return 0; }