From db75537e251945a06d1ecd6b0d5c9538c9039c58 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 30 Jul 2013 11:04:48 +0200 Subject: [PATCH] avutil/tree: allow adjusting the log level Signed-off-by: Michael Niedermayer --- libavutil/tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavutil/tree.c b/libavutil/tree.c index 807dbe0ef8..10f7d59385 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -206,12 +206,15 @@ static int cmp(void *a, const void *b) return (uint8_t *) a - (const uint8_t *) b; } -int main(void) +int main(int argc, char **argv) { int i; void *k; AVTreeNode *root = NULL, *node = NULL; AVLFG prng; + int log_level = argc <= 1 ? AV_LOG_INFO : atoi(argv[1]); + + av_log_set_level(log_level); av_lfg_init(&prng, 1);