[FFmpeg-cvslog] avutil/tree: allow adjusting the log level

Michael Niedermayer git at videolan.org
Tue Jul 30 11:12:37 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 30 11:04:48 2013 +0200| [db75537e251945a06d1ecd6b0d5c9538c9039c58] | committer: Michael Niedermayer

avutil/tree: allow adjusting the log level

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db75537e251945a06d1ecd6b0d5c9538c9039c58
---

 libavutil/tree.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavutil/tree.c b/libavutil/tree.c
index 807dbe0..10f7d59 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);
 



More information about the ffmpeg-cvslog mailing list