[FFmpeg-devel] [PATCH] ffserver: Parse audio bit rates as floating point
Sun May 30 22:19:56 CEST 2010
On Sun, 30 May 2010, Ronald S. Bultje wrote:
> On Sat, May 29, 2010 at 1:05 PM, Martin Storsj? <martin at martin.st> wrote:
> > With the attached patch, the audio bit rate configuration is read as
> > floating point, allowing to set e.g. 12.2 kbps, which is one of the
> > supported bitrates of the libopencore_amrnb encoder (which has no bitrates
> > that are exact multiples of 1000).
> > - audio_enc.bit_rate = atoi(arg) * 1000;
> > + audio_enc.bit_rate = atof(arg) * 1000;
> You probably want to round (something like lrintf() or so) to prevent
> obvious rounding errors inherent to floats.
Ah, good idea. Updated patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1011 bytes
More information about the ffmpeg-devel