[FFmpeg-cvslog] r17146 - trunk/libavformat/mov.c
bcoudurier
subversion
Wed Feb 11 03:32:41 CET 2009
Author: bcoudurier
Date: Wed Feb 11 03:32:39 2009
New Revision: 17146
Log:
adjust time rate according to elst time offset
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Wed Feb 11 02:06:12 2009 (r17145)
+++ trunk/libavformat/mov.c Wed Feb 11 03:32:39 2009 (r17146)
@@ -1162,8 +1162,6 @@ static int mov_read_stts(MOVContext *c,
return -1;
dprintf(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);
- sc->time_rate=0;
-
for(i=0; i<entries; i++) {
int sample_duration;
int sample_count;
@@ -1768,8 +1766,10 @@ static int mov_read_elst(MOVContext *c,
get_be32(pb); /* Track duration */
time = get_be32(pb); /* Media time */
get_be32(pb); /* Media rate */
- if (i == 0 && time != -1)
+ if (i == 0 && time != -1) {
sc->time_offset = time;
+ sc->time_rate = av_gcd(sc->time_rate, time);
+ }
}
if(edit_count > 1)
More information about the ffmpeg-cvslog
mailing list