]> git.sesse.net Git - ffmpeg/commitdiff
avformat/ircamdec: use lrintf() for rounding
authorPaul B Mahol <onemda@gmail.com>
Tue, 16 Feb 2021 22:35:11 +0000 (23:35 +0100)
committerPaul B Mahol <onemda@gmail.com>
Tue, 16 Feb 2021 22:45:01 +0000 (23:45 +0100)
libavformat/ircamdec.c

index 17bfb4ed105c87ef14ea32af15e06bd5e2ee22ab..db09f606c6f7523c0ce7218ff56d9bd1809b17b6 100644 (file)
@@ -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;