ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Mon May 25 13:00:14 2015 +0200| [cf401cd12b79a309eaf8d73c5a3ea72ae9836c26] | committer: Michael Niedermayer
avformat/rmenc: Avoid floats in duration calculation Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf401cd12b79a309eaf8d73c5a3ea72ae9836c26 --- libavformat/rmenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 73d175d..7e4345b 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -102,7 +102,7 @@ static int rv10_write_header(AVFormatContext *ctx, nb_packets += stream->nb_packets; packet_total_size += stream->packet_total_size; /* select maximum duration */ - v = (int) (1000.0 * (float)stream->total_frames / stream->frame_rate); + v = 1000LL * stream->total_frames / stream->frame_rate; if (v > duration) duration = v; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog