Browse Source

cmdutils: Fix loglevel for -debug

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 13 years ago
parent
commit
e9adeeec98
3 changed files with 9 additions and 0 deletions
  1. +6
    -0
      cmdutils.c
  2. +2
    -0
      cmdutils.h
  3. +1
    -0
      cmdutils_common_opts.h

+ 6
- 0
cmdutils.c View File

@@ -423,6 +423,12 @@ int opt_loglevel(const char *opt, const char *arg)
return 0; 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) int opt_timelimit(const char *opt, const char *arg)
{ {
#if HAVE_SETRLIMIT #if HAVE_SETRLIMIT


+ 2
- 0
cmdutils.h View 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_loglevel(const char *opt, const char *arg);


int opt_codec_debug(const char *opt, const char *arg);

/** /**
* Limit the execution time. * Limit the execution time.
*/ */


+ 1
- 0
cmdutils_common_opts.h View File

@@ -13,3 +13,4 @@
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" }, { "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" }, { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
{ "v", 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" },

Loading…
Cancel
Save