[FFmpeg-cvslog] avformat/swfenc: Remove another unneeded float computation

Michael Niedermayer git at videolan.org
Sun May 24 13:34:31 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 24 12:38:54 2015 +0200| [28134d6a0e1462c7bc6807284738ed552ef6d2a5] | committer: Michael Niedermayer

avformat/swfenc: Remove another unneeded float computation

fewer chances for rounding differences between platforms is better

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

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

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

diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 4580651..56d9879 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -236,7 +236,7 @@ static int swf_write_header(AVFormatContext *s)
     }
 
     if (!swf->audio_enc)
-        swf->samples_per_frame = (44100.0 * rate_base) / rate;
+        swf->samples_per_frame = (44100LL * rate_base) / rate;
     else
         swf->samples_per_frame = (swf->audio_enc->sample_rate * rate_base) / rate;
 



More information about the ffmpeg-cvslog mailing list