[FFmpeg-cvslog] avformat/mpegenc: Replace *0.7 by *7/10

Michael Niedermayer git at videolan.org
Mon May 25 13:35:05 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 25 12:57:22 2015 +0200| [343654c288d0b313c872f9e5f5e3ac85a6745493] | committer: Michael Niedermayer

avformat/mpegenc: Replace *0.7 by *7/10

This avoids another float computation, avoiding a potential source of
rounding issues

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=343654c288d0b313c872f9e5f5e3ac85a6745493
---

 libavformat/mpegenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 4984d57..2520f49 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -321,7 +321,7 @@ static av_cold int mpeg_mux_init(AVFormatContext *ctx)
     } else
         s->packet_size = 2048;
     if (ctx->max_delay < 0)     /* Not set by the caller */
-        ctx->max_delay = 0.7*AV_TIME_BASE;
+        ctx->max_delay = AV_TIME_BASE*7/10;
 
     s->vcd_padding_bytes_written = 0;
     s->vcd_padding_bitrate_num   = 0;



More information about the ffmpeg-cvslog mailing list