aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/tree.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-30 11:04:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-30 11:04:48 +0200
commitdb75537e251945a06d1ecd6b0d5c9538c9039c58 (patch)
tree49629958a470fc45aae16571fdcb015b12388223 /libavutil/tree.c
parent647836608c9fd9c701ffa5e63cc616e018117176 (diff)
downloadffmpeg-db75537e251945a06d1ecd6b0d5c9538c9039c58.tar.gz
avutil/tree: allow adjusting the log level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/tree.c')
-rw-r--r--libavutil/tree.c5
1 files changed, 4 insertions, 1 deletions
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);