aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBryce McLeod <bryce.mcleod@codory.com>2014-03-12 12:52:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-12 12:52:27 +0100
commit581957cd8618f07d824da1b9f6ae1c97531b03ab (patch)
treed62d8f9e9a5fde71634f9dc159f0360cb494108a /libavformat/movenc.c
parent5336cd6374c7cbba9d6e65de1cec9404efcb665f (diff)
downloadffmpeg-581957cd8618f07d824da1b9f6ae1c97531b03ab.tar.gz
avformat/movenc: rescale when copying duration to timecode track
Fixes Ticket3453 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e21c32a30b..e90636972d 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2502,7 +2502,10 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
int src_trk = mov->tracks[i].src_track;
mov->tracks[src_trk].tref_tag = mov->tracks[i].tag;
mov->tracks[src_trk].tref_id = mov->tracks[i].track_id;
- mov->tracks[i].track_duration = mov->tracks[src_trk].track_duration;
+ //src_trk may have a different timescale than the tmcd track
+ mov->tracks[i].track_duration = av_rescale(mov->tracks[src_trk].track_duration,
+ mov->tracks[i].timescale,
+ mov->tracks[src_trk].timescale);
}
}