Commit 31737c28 authored by stefano's avatar stefano

Make all the numeric options accept in input an expression which is

evaluated through av_strtod().

Fix roundup issue #551.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23556 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3c756d18
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "libpostproc/postprocess.h" #include "libpostproc/postprocess.h"
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
#include "libavutil/eval.h"
#include "libavcodec/opt.h" #include "libavcodec/opt.h"
#include "cmdutils.h" #include "cmdutils.h"
#include "version.h" #include "version.h"
...@@ -58,7 +59,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do ...@@ -58,7 +59,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do
{ {
char *tail; char *tail;
const char *error; const char *error;
double d = strtod(numstr, &tail); double d = av_strtod(numstr, &tail);
if (*tail) if (*tail)
error= "Expected number for %s but found: %s\n"; error= "Expected number for %s but found: %s\n";
else if (d < min || d > max) else if (d < min || d > max)
......
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 @section Generic options
These options are shared amongst the ff* tools. These options are shared amongst the ff* tools.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment