Commit fa169d56 authored by Jean First's avatar Jean First Committed by 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: 's avatarJean First <jeanfirst@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 60168f93
...@@ -794,6 +794,9 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -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); av_dlog(c->fc, "time scale = %i\n", c->time_scale);
c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */ 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_rb32(pb); /* preferred scale */
avio_rb16(pb); /* preferred volume */ avio_rb16(pb); /* preferred volume */
...@@ -809,8 +812,6 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -809,8 +812,6 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* selection duration */ avio_rb32(pb); /* selection duration */
avio_rb32(pb); /* current time */ avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */ avio_rb32(pb); /* next track ID */
c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment