diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-26 14:51:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-26 14:51:00 +0200 |
commit | 894d8cf418aafc5f6dd697f57e24f3e96b6af2f3 (patch) | |
tree | a2c47475f87f0e568369efd423b228982f0a0607 /libavformat/movenc.c | |
parent | f902b0b2cbdcb21c6c888819fbc51de2168d7d5a (diff) | |
download | ffmpeg-894d8cf418aafc5f6dd697f57e24f3e96b6af2f3.tar.gz |
avformat/movenc: Avoid floats & float rounding in tmcd nb_frames calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index dc9570b50c..0942a11208 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1801,7 +1801,7 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track) int64_t pos = avio_tell(pb); #if 1 int frame_duration = av_rescale(track->timescale, track->enc->time_base.num, track->enc->time_base.den); - int nb_frames = 1.0/av_q2d(track->enc->time_base) + 0.5; + int nb_frames = ROUNDED_DIV(track->enc->time_base.den, track->enc->time_base.num); AVDictionaryEntry *t = NULL; if (nb_frames > 255) { |