Commit cf401cd1 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rmenc: Avoid floats in duration calculation

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 343654c2
......@@ -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;
}
......
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