[FFmpeg-cvslog] r23556 - in trunk: cmdutils.c doc/fftools-common-opts.texi
stefano
subversion
Wed Jun 9 23:28:53 CEST 2010
Author: stefano
Date: Wed Jun 9 23:28:53 2010
New Revision: 23556
Log:
Make all the numeric options accept in input an expression which is
evaluated through av_strtod().
Fix roundup issue #551.
Modified:
trunk/cmdutils.c
trunk/doc/fftools-common-opts.texi
Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c Wed Jun 9 20:30:50 2010 (r23555)
+++ trunk/cmdutils.c Wed Jun 9 23:28:53 2010 (r23556)
@@ -36,6 +36,7 @@
#include "libpostproc/postprocess.h"
#include "libavutil/avstring.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/eval.h"
#include "libavcodec/opt.h"
#include "cmdutils.h"
#include "version.h"
@@ -58,7 +59,7 @@ double parse_number_or_die(const char *c
{
char *tail;
const char *error;
- double d = strtod(numstr, &tail);
+ double d = av_strtod(numstr, &tail);
if (*tail)
error= "Expected number for %s but found: %s\n";
else if (d < min || d > max)
Modified: trunk/doc/fftools-common-opts.texi
==============================================================================
--- trunk/doc/fftools-common-opts.texi Wed Jun 9 20:30:50 2010 (r23555)
+++ trunk/doc/fftools-common-opts.texi Wed Jun 9 23:28:53 2010 (r23556)
@@ -1,3 +1,11 @@
+All the numerical options, if not specified otherwise, accept in input
+a string representing a number, which may contain one of the
+International System number postfixes, for example 'K', 'M', 'G'.
+If 'i' is appended after the postfix, powers of 2 are used instead of
+powers of 10. The 'B' postfix multiplies the value for 8, and can be
+appended after another postfix or used alone. This allows using for
+example 'KB', 'MiB', 'G' and 'B' as postfix.
+
@section Generic options
These options are shared amongst the ff* tools.
More information about the ffmpeg-cvslog
mailing list