[FFmpeg-cvslog] AVOptions: cosmetics, move and rename static av_set_number().

Anton Khirnov git at videolan.org
Tue Oct 11 03:52:33 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Aug 23 13:03:42 2011 +0200| [b003d0be5b332fa1dcac0549c80c02676c245024] | committer: Anton Khirnov

AVOptions: cosmetics, move and rename static av_set_number().

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b003d0be5b332fa1dcac0549c80c02676c245024
---

 libavutil/opt.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 876ea4c..2ff9166 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);
 }
 
 /**



More information about the ffmpeg-cvslog mailing list