[FFmpeg-cvslog] avformat/ircamdec: use lrintf() for rounding

Paul B Mahol git at videolan.org
Wed Feb 17 00:45:41 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Feb 16 23:35:11 2021 +0100| [8331eb058d884897aca2ef62ac9b98b536caec6e] | committer: Paul B Mahol

avformat/ircamdec: use lrintf() for rounding

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

 libavformat/ircamdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c
index 17bfb4ed10..db09f606c6 100644
--- a/libavformat/ircamdec.c
+++ b/libavformat/ircamdec.c
@@ -66,12 +66,12 @@ static int ircam_read_header(AVFormatContext *s)
     }
 
     if (le == 1) {
-        sample_rate = av_int2float(avio_rl32(s->pb));
+        sample_rate = lrintf(av_int2float(avio_rl32(s->pb)));
         channels    = avio_rl32(s->pb);
         tag         = avio_rl32(s->pb);
         tags        = ff_codec_ircam_le_tags;
     } else if (le == 0) {
-        sample_rate = av_int2float(avio_rb32(s->pb));
+        sample_rate = lrintf(av_int2float(avio_rb32(s->pb)));
         channels    = avio_rb32(s->pb);
         tag         = avio_rb32(s->pb);
         tags        = ff_codec_ircam_be_tags;



More information about the ffmpeg-cvslog mailing list