# HG changeset patch # User bellard # Date 1060365518 0 # Node ID efb35207fb1bfcd97fa8be02cf8b7048253a0b68 # Parent 94fa5e3367ed7aeb895090875876d089b65de6b5 update duration and start_time diff -r 94fa5e3367ed -r efb35207fb1b mov.c --- a/mov.c Fri Aug 08 17:54:05 2003 +0000 +++ b/mov.c Fri Aug 08 17:58:38 2003 +0000 @@ -895,7 +895,7 @@ ); #endif - st->time_length=0;//Not possible to get from this info, must count number of AMR frames + st->duration = AV_NOPTS_VALUE;//Not possible to get from this info, must count number of AMR frames st->codec.sample_rate=8000; st->codec.channels=1; st->codec.bits_per_sample=16; @@ -1153,7 +1153,8 @@ sc->sample_to_chunk_index = -1; st->priv_data = sc; st->codec.codec_type = CODEC_TYPE_MOV_OTHER; - st->time_length = (c->duration * 1000) / c->time_scale; // time in miliseconds + st->start_time = 0; /* XXX: check */ + st->duration = (c->duration * (int64_t)AV_TIME_BASE) / c->time_scale; c->streams[c->fc->nb_streams-1] = sc; return mov_read_default(c, pb, atom); @@ -1182,7 +1183,8 @@ get_be32(pb); /* modification time */ st->id = (int)get_be32(pb); /* track id (NOT 0 !)*/ get_be32(pb); /* reserved */ - st->time_length = get_be32(pb) * 1000 / c->time_scale; /* duration */ + st->start_time = 0; /* check */ + st->duration = (get_be32(pb) * (int64_t)AV_TIME_BASE) / c->time_scale; /* duration */ get_be32(pb); /* reserved */ get_be32(pb); /* reserved */