[Ffmpeg-devel] [PATCH] fix av_log_set_level undefined
Limin Wang
lance.lmwang
Wed Feb 7 07:42:56 CET 2007
Hi,
I think av_log_get/set_level is useful function and
shouldn't depend on LIBAVUTIL_VERSION_INT version.
The attached patch try to fix compile failed after
LIBAVUTIL_VERSION_INT increased.
Thanks,
Limin
-------------- next part --------------
Index: libavutil/log.c
===================================================================
--- libavutil/log.c (revision 7867)
+++ libavutil/log.c (working copy)
@@ -59,12 +59,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);
-}
-
int av_log_get_level(void)
{
return av_log_level;
@@ -75,6 +69,12 @@
av_log_level = level;
}
+#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);
+}
+
void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
{
av_log_callback = callback;
Index: libavutil/log.h
===================================================================
--- libavutil/log.h (revision 7867)
+++ libavutil/log.h (working copy)
@@ -89,10 +89,11 @@
extern void av_log(void*, int level, const char *fmt, ...);
#endif
+extern int av_log_get_level(void);
+extern void av_log_set_level(int);
+
#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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070207/e388151d/attachment.pgp>
More information about the ffmpeg-devel
mailing list