Commit 9362f31b authored by Michael Niedermayer's avatar Michael Niedermayer

movenc: Calculate fps for tmcd without intermediate step.

Fixes part of Ticket2045
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bee044d7
...@@ -1147,7 +1147,7 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track) ...@@ -1147,7 +1147,7 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
{ {
int64_t pos = avio_tell(pb); int64_t pos = avio_tell(pb);
int frame_duration = av_rescale(track->timescale, track->enc->time_base.num, track->enc->time_base.den); 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 */ avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "tmcd"); /* Data format */ ffio_wfourcc(pb, "tmcd"); /* Data format */
......
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