[FFmpeg-cvslog] r25095 - trunk/libavformat/nutenc.c
mru
subversion
Fri Sep 10 15:16:08 CEST 2010
Author: mru
Date: Fri Sep 10 15:16:08 2010
New Revision: 25095
Log:
nutenc: fix unstable floating-point calculations
Modified:
trunk/libavformat/nutenc.c
Modified: trunk/libavformat/nutenc.c
==============================================================================
--- trunk/libavformat/nutenc.c Fri Sep 10 08:19:31 2010 (r25094)
+++ trunk/libavformat/nutenc.c Fri Sep 10 15:16:08 2010 (r25095)
@@ -561,11 +561,11 @@ static int write_header(AVFormatContext
if(j==nut->time_base_count)
nut->time_base_count++;
- if(av_q2d(time_base) >= 0.001)
+ if(INT64_C(1000) * time_base.num >= time_base.den)
nut->stream[i].msb_pts_shift = 7;
else
nut->stream[i].msb_pts_shift = 14;
- nut->stream[i].max_pts_distance= FFMAX(1/av_q2d(time_base), 1);
+ nut->stream[i].max_pts_distance= FFMAX(time_base.den, time_base.num) / time_base.num;
}
nut->max_distance = MAX_DISTANCE;
More information about the ffmpeg-cvslog
mailing list