aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-17 18:51:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-24 18:57:12 +0100
commit9362f31b55510142eefa6d0cc26013a30bd4fc51 (patch)
tree3da696c32fd3fcb57ac9a791dd052f6da7264ee4
parentbee044d7c261a9e488ee14705814361694b9acdb (diff)
downloadffmpeg-9362f31b55510142eefa6d0cc26013a30bd4fc51.tar.gz
movenc: Calculate fps for tmcd without intermediate step.
Fixes part of Ticket2045 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index f08aa7e0db..d9b002e0b5 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1147,7 +1147,7 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
int frame_duration = av_rescale(track->timescale, track->enc->time_base.num, track->enc->time_base.den);
- int nb_frames = (track->timescale + frame_duration/2) / frame_duration;
+ int nb_frames = 1.0/av_q2d(track->enc->time_base) + 0.5;
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "tmcd"); /* Data format */