avformat/rmenc: Avoid floats in duration calculation
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 25 May 2015 11:00:14 +0000 (13:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 25 May 2015 11:34:43 +0000 (13:34 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rmenc.c

index 73d175d..7e4345b 100644 (file)
@@ -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;
     }