diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-08-23 13:03:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-10-10 20:27:31 +0200 |
commit | b003d0be5b332fa1dcac0549c80c02676c245024 (patch) | |
tree | aa6cc51cca3d1b4182e9db0fbf3877db339c6327 /libavutil/opt.c | |
parent | c8d787d2ef1c6dc0af29acb8bac97a6ae67d0520 (diff) | |
download | ffmpeg-b003d0be5b332fa1dcac0549c80c02676c245024.tar.gz |
AVOptions: cosmetics, move and rename static av_set_number().
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 876ea4c511..2ff9166931 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -86,15 +86,6 @@ static int av_set_number2(void *obj, const char *name, double num, int den, int6 return 0; } -static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum) -{ - const AVOption *o = NULL; - if (av_set_number2(obj, name, num, den, intnum, &o) < 0) - return NULL; - else - return o; -} - static const double const_values[] = { M_PI, M_E, @@ -231,19 +222,28 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons return AVERROR(EINVAL); } +static const AVOption *set_number(void *obj, const char *name, double num, int den, int64_t intnum) +{ + const AVOption *o = NULL; + if (av_set_number2(obj, name, num, den, intnum, &o) < 0) + return NULL; + else + return o; +} + const AVOption *av_set_double(void *obj, const char *name, double n) { - return av_set_number(obj, name, n, 1, 1); + return set_number(obj, name, n, 1, 1); } const AVOption *av_set_q(void *obj, const char *name, AVRational n) { - return av_set_number(obj, name, n.num, n.den, 1); + return set_number(obj, name, n.num, n.den, 1); } const AVOption *av_set_int(void *obj, const char *name, int64_t n) { - return av_set_number(obj, name, 1, 1, n); + return set_number(obj, name, 1, 1, n); } /** |