[FFmpeg-cvslog] r23419 - trunk/ffserver.c

mstorsjo subversion
Wed Jun 2 09:09:44 CEST 2010


Author: mstorsjo
Date: Wed Jun  2 09:09:44 2010
New Revision: 23419

Log:
ffserver: Allow floating point audio bit rates

This allows setting bit rates that aren't an exact multiple of 1000.

Modified:
   trunk/ffserver.c

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	Tue Jun  1 22:59:06 2010	(r23418)
+++ trunk/ffserver.c	Wed Jun  2 09:09:44 2010	(r23419)
@@ -4300,7 +4300,7 @@ static int parse_ffconfig(const char *fi
         } else if (!strcasecmp(cmd, "AudioBitRate")) {
             get_arg(arg, sizeof(arg), &p);
             if (stream)
-                audio_enc.bit_rate = atoi(arg) * 1000;
+                audio_enc.bit_rate = lrintf(atof(arg) * 1000);
         } else if (!strcasecmp(cmd, "AudioChannels")) {
             get_arg(arg, sizeof(arg), &p);
             if (stream)



More information about the ffmpeg-cvslog mailing list