diff options
author | Jean First <jeanfirst@gmail.com> | 2012-01-14 14:10:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-16 03:27:01 +0100 |
commit | fa169d5650b2d9e9c3d43be16208bb94d873a803 (patch) | |
tree | 31603dcc137417304ca1b15bc010f0c1d2905a65 | |
parent | 60168f9319ab959758ce75698e1855408a76fd28 (diff) | |
download | ffmpeg-fa169d5650b2d9e9c3d43be16208bb94d873a803.tar.gz |
mov: cosmetics - move a line to a better position and add a comment
mov: cosmetics - move a line to a better position and add a comment
Oana Andreea Stratulat submitted a similar patch to trac, but forgot
to notify the ML about it.
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index bc58254dc4..d242596107 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -794,6 +794,9 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "time scale = %i\n", c->time_scale); c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */ + // set the AVCodecContext duration because the duration of individual tracks + // may be inaccurate + c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale); avio_rb32(pb); /* preferred scale */ avio_rb16(pb); /* preferred volume */ @@ -809,8 +812,6 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); /* selection duration */ avio_rb32(pb); /* current time */ avio_rb32(pb); /* next track ID */ - - c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale); return 0; } |