summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-06 22:50:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-06 22:50:58 +0000
commitda7272b33596b5ee7632dc66fe8cc33d22173cef (patch)
tree73d48ff54f9ba09d8f54ce0e2c4a2edc0c05be9a /libavformat
parent3735e82f2d2687c083d1fc9c6c276328cedb9895 (diff)
set time_base as soon as time_scale is known instead of in a unrelated chunck which might be missing
Originally committed as revision 4569 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index e050dddc5f..09552a48d7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -640,6 +640,7 @@ static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
get_be32(pb); /* modification time */
c->streams[c->fc->nb_streams-1]->time_scale = get_be32(pb);
+ av_set_pts_info(c->fc->streams[c->fc->nb_streams-1], 64, 1, c->streams[c->fc->nb_streams-1]->time_scale);
#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "track[%i].time_scale = %i\n", c->fc->nb_streams-1, c->streams[c->fc->nb_streams-1]->time_scale); /* time scale */
@@ -1345,9 +1346,6 @@ av_log(NULL, AV_LOG_DEBUG, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1,
total_sample_count+=sample_count;
}
- av_set_pts_info(st, 64, 1, c->streams[c->fc->nb_streams-1]->time_scale);
-// st->codec->time_base.num = 1;
-// st->codec->time_base.den = c->streams[c->fc->nb_streams-1]->time_scale;
st->nb_frames= total_sample_count;
if(duration)
st->duration= duration;