OSDN Git Service

cmdutils: Fix loglevel for -debug
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Oct 2011 00:13:46 +0000 (02:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Oct 2011 00:18:55 +0000 (02:18 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils.c
cmdutils.h
cmdutils_common_opts.h

index d27759e..00c5d71 100644 (file)
@@ -423,6 +423,12 @@ int opt_loglevel(const char *opt, const char *arg)
     return 0;
 }
 
+int opt_codec_debug(const char *opt, const char *arg)
+{
+    av_log_set_level(AV_LOG_DEBUG);
+    return opt_default(opt, arg);
+}
+
 int opt_timelimit(const char *opt, const char *arg)
 {
 #if HAVE_SETRLIMIT
index d1e84e0..7a8c69b 100644 (file)
@@ -76,6 +76,8 @@ int opt_default(const char *opt, const char *arg);
  */
 int opt_loglevel(const char *opt, const char *arg);
 
+int opt_codec_debug(const char *opt, const char *arg);
+
 /**
  * Limit the execution time.
  */
index 70b0d83..cced0bb 100644 (file)
@@ -13,3 +13,4 @@
     { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
     { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
     { "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
+    { "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },