st->codec.frame_rate = FRAME_RATE_BASE * c->streams[c->total_streams]->time_scale; if (sample_duration) st->codec.frame_rate /= sample_duration;
st->codec.frame_rate_base = sample_duration ? sample_duration : 1; st->codec.frame_rate = c->streams[c->total_streams]->time_scale;
static int parse_stts(const MOVParseTableEntry *parse_table, ByteIOContext *pb, uint32_t atom_type, int64_t atom_offset, int64_t atom_size, void *param){    MOVContext *c;    int entries, i;    AVStream *st;    MOVStreamContext *sc;#ifdef DEBUG    print_atom("stts", atom_type, atom_offset, atom_size);#endif    c = (MOVContext *)param;    st = c->fc->streams[c->fc->nb_streams-1];    sc = (MOVStreamContext *)st->priv_data;    get_byte(pb); /* version */    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */    entries = get_be32(pb);#ifdef DEBUGprintf("track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);#endif    for(i=0; i<entries; i++) {        int sample_duration;        get_be32(pb);        sample_duration = get_be32(pb);        if (!i && st->codec.codec_type==CODEC_TYPE_VIDEO) {            st->codec.frame_rate = FRAME_RATE_BASE * c->streams[c->total_streams]->time_scale;            if (sample_duration)                st->codec.frame_rate /= sample_duration;#ifdef DEBUG            printf("VIDEO FRAME RATE= %i (sd= %i)\n", st->codec.frame_rate, sample_duration);#endif        }    }    return 0;}