[FFmpeg-devel] [PATCH 06/11] Reindent.

Stefano Sabatini stefano.sabatini-lala
Fri Nov 12 19:31:44 CET 2010


---
 cmdutils.c |   88 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 575e32b..5f42d12 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -147,51 +147,51 @@ static int set_option(const char *ctx, const OptionDef **optdef,
     const OptionDef *po;
     int ret, bool_val = 1;
 
-            po= find_option(options, opt);
-            if (!po->name && opt[0] == 'n' && opt[1] == 'o') {
-                /* handle 'no' bool option */
-                po = find_option(options, opt + 2);
-                if (!(po->name && (po->flags & OPT_BOOL)))
-                    goto unknown_opt;
-                bool_val = 0;
-            }
-            if (!po->name)
-                po= find_option(options, "default");
-            *optdef = po;
-            if (po->flags & HAS_ARG && !arg) {
-                    fprintf(stderr, "%s: missing argument for option '%s'\n", ctx, opt);
-                    return AVERROR(EINVAL);
-                }
-
-            if (!po->name) {
-unknown_opt:
-                fprintf(stderr, "%s: unrecognized option '%s'\n", ctx, opt);
-                return AVERROR(EINVAL);
-            }
-            if (po->flags & OPT_STRING) {
-                char *str;
-                str = av_strdup(arg);
-                *po->u.str_arg = str;
-            } else if (po->flags & OPT_BOOL) {
-                *po->u.int_arg = bool_val;
-            } else if (po->flags & OPT_INT) {
-                *po->u.int_arg = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
-            } else if (po->flags & OPT_INT64) {
-                *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
-            } else if (po->flags & OPT_FLOAT) {
-                *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
-            } else if (po->flags & OPT_FUNC2) {
-                if ((ret = po->u.func2_arg(opt, arg)) < 0) {
-                    fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", ctx, arg, opt);
-                    return ret;
-                }
-            } else {
-                po->u.func_arg(arg);
-            }
-            if(po->flags & OPT_EXIT)
-                exit(0);
+    po= find_option(options, opt);
+    if (!po->name && opt[0] == 'n' && opt[1] == 'o') {
+        /* handle 'no' bool option */
+        po = find_option(options, opt + 2);
+        if (!(po->name && (po->flags & OPT_BOOL)))
+            goto unknown_opt;
+        bool_val = 0;
+    }
+    if (!po->name)
+        po= find_option(options, "default");
+    *optdef = po;
+    if (po->flags & HAS_ARG && !arg) {
+        fprintf(stderr, "%s: missing argument for option '%s'\n", ctx, opt);
+        return AVERROR(EINVAL);
+    }
 
-            return 0;
+    if (!po->name) {
+    unknown_opt:
+        fprintf(stderr, "%s: unrecognized option '%s'\n", ctx, opt);
+        return AVERROR(EINVAL);
+    }
+    if (po->flags & OPT_STRING) {
+        char *str;
+        str = av_strdup(arg);
+        *po->u.str_arg = str;
+    } else if (po->flags & OPT_BOOL) {
+        *po->u.int_arg = bool_val;
+    } else if (po->flags & OPT_INT) {
+        *po->u.int_arg = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
+    } else if (po->flags & OPT_INT64) {
+        *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
+    } else if (po->flags & OPT_FLOAT) {
+        *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
+    } else if (po->flags & OPT_FUNC2) {
+        if ((ret = po->u.func2_arg(opt, arg)) < 0) {
+            fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", ctx, arg, opt);
+            return ret;
+        }
+    } else {
+        po->u.func_arg(arg);
+    }
+    if(po->flags & OPT_EXIT)
+        exit(0);
+
+    return 0;
 }
 
 void parse_options(int argc, char **argv, const OptionDef *options,
-- 
1.7.1




More information about the ffmpeg-devel mailing list