[FFmpeg-cvslog] cmdutils: Fix loglevel for -debug
Michael Niedermayer
git at videolan.org
Fri Oct 14 02:21:25 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 14 02:13:46 2011 +0200| [e9adeeec98df59cf0163c506e8b0f734cfd54c7b] | committer: Michael Niedermayer
cmdutils: Fix loglevel for -debug
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9adeeec98df59cf0163c506e8b0f734cfd54c7b
---
cmdutils.c | 6 ++++++
cmdutils.h | 2 ++
cmdutils_common_opts.h | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/cmdutils.c b/cmdutils.c
index d27759e..00c5d71 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 d1e84e0..7a8c69b 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 70b0d83..cced0bb 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" },
More information about the ffmpeg-cvslog
mailing list