changeset 408:0ce74d34d02e libavutil

use av_log_get/set_level()
author mru
date Wed, 12 Dec 2007 21:48:50 +0000
parents 7390e0fc2fd3
children c03847b47260
files log.c log.h
diffstat 2 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/log.c	Wed Dec 12 21:03:11 2007 +0000
+++ b/log.c	Wed Dec 12 21:48:50 2007 +0000
@@ -45,11 +45,7 @@
     vfprintf(stderr, fmt, vl);
 }
 
-#if LIBAVUTIL_VERSION_INT < (50<<16)
 static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback;
-#else
-void (*av_vlog)(void*, int, const char*, va_list) = av_log_default_callback;
-#endif
 
 void av_log(void* avcl, int level, const char *fmt, ...)
 {
@@ -59,7 +55,6 @@
     va_end(vl);
 }
 
-#if LIBAVUTIL_VERSION_INT < (50<<16)
 void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
 {
     av_log_callback(avcl, level, fmt, vl);
@@ -79,4 +74,3 @@
 {
     av_log_callback = callback;
 }
-#endif
--- a/log.h	Wed Dec 12 21:03:11 2007 +0000
+++ b/log.h	Wed Dec 12 21:48:50 2007 +0000
@@ -81,7 +81,10 @@
  */
 #define AV_LOG_DEBUG    48
 #endif
+
+#if LIBAVUTIL_VERSION_INT < (50<<16)
 extern int av_log_level;
+#endif
 
 /**
  * Send the specified message to the log if the level is less than or equal to
@@ -103,14 +106,10 @@
 extern void av_log(void*, int level, const char *fmt, ...);
 #endif
 
-#if LIBAVUTIL_VERSION_INT < (50<<16)
 extern void av_vlog(void*, int level, const char *fmt, va_list);
 extern int av_log_get_level(void);
 extern void av_log_set_level(int);
 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
 extern void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
-#else
-extern void (*av_vlog)(void*, int, const char*, va_list);
-#endif
 
 #endif /* FFMPEG_LOG_H */