Skip to content

Commit

Permalink
cmdutils: Fix loglevel for -debug
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Oct 14, 2011
1 parent 8937afd commit e9adeee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmdutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cmdutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions cmdutils_common_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" },

0 comments on commit e9adeee

Please sign in to comment.