summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-14 02:13:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-14 02:18:55 +0200
commite9adeeec98df59cf0163c506e8b0f734cfd54c7b (patch)
tree1aaaab044cc88feb91535a6043385b373675e182
parent8937afd39f378ad3ae5bc2e54da6655680775e77 (diff)
cmdutils: Fix loglevel for -debug
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--cmdutils.c6
-rw-r--r--cmdutils.h2
-rw-r--r--cmdutils_common_opts.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index d27759ea93..00c5d71144 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -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
diff --git a/cmdutils.h b/cmdutils.h
index d1e84e0d90..7a8c69b50d 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -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.
*/
diff --git a/cmdutils_common_opts.h b/cmdutils_common_opts.h
index 70b0d83fc5..cced0bb895 100644
--- a/cmdutils_common_opts.h
+++ b/cmdutils_common_opts.h
@@ -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" },