avformat/ircamenc: Avoid floats
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 26 May 2015 17:54:41 +0000 (19:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 26 May 2015 17:54:41 +0000 (19:54 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ircamenc.c

index 38f15fb..1a829d4 100644 (file)
@@ -43,7 +43,7 @@ static int ircam_write_header(AVFormatContext *s)
     }
 
     avio_wl32(s->pb, 0x0001A364);
-    avio_wl32(s->pb, av_float2int(codec->sample_rate));
+    avio_wl32(s->pb, av_q2intfloat((AVRational){codec->sample_rate, 1}));
     avio_wl32(s->pb, codec->channels);
     avio_wl32(s->pb, tag);
     ffio_fill(s->pb, 0, 1008);