Browse code

cmdutils: Fix loglevel for -debug

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/10/14 09:13:46
Showing 3 changed files
... ...
@@ -423,6 +423,12 @@ int opt_loglevel(const char *opt, const char *arg)
423 423
     return 0;
424 424
 }
425 425
 
426
+int opt_codec_debug(const char *opt, const char *arg)
427
+{
428
+    av_log_set_level(AV_LOG_DEBUG);
429
+    return opt_default(opt, arg);
430
+}
431
+
426 432
 int opt_timelimit(const char *opt, const char *arg)
427 433
 {
428 434
 #if HAVE_SETRLIMIT
... ...
@@ -76,6 +76,8 @@ int opt_default(const char *opt, const char *arg);
76 76
  */
77 77
 int opt_loglevel(const char *opt, const char *arg);
78 78
 
79
+int opt_codec_debug(const char *opt, const char *arg);
80
+
79 81
 /**
80 82
  * Limit the execution time.
81 83
  */
... ...
@@ -13,3 +13,4 @@
13 13
     { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
14 14
     { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
15 15
     { "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
16
+    { "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },