[FFmpeg-devel] [PATCH] ffserver: Parse audio bit rates as floating point
Martin Storsjö
martin
Sun May 30 22:19:56 CEST 2010
Hi,
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.
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffserver-Allow-floating-point-audio-bit-rates.patch
Type: text/x-diff
Size: 1011 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100530/f6cfc222/attachment.patch>
More information about the ffmpeg-devel
mailing list