[FFmpeg-cvslog] mov: cosmetics - move a line to a better position and add a comment
Jean First
git at videolan.org
Mon Jan 16 03:40:27 CET 2012
ffmpeg | branch: master | Jean First <jeanfirst at gmail.com> | Sat Jan 14 14:10:20 2012 +0100| [fa169d5650b2d9e9c3d43be16208bb94d873a803] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa169d5650b2d9e9c3d43be16208bb94d873a803
---
libavformat/mov.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index bc58254..d242596 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;
}
More information about the ffmpeg-cvslog
mailing list