[vlc-commits] commit: ASCII Art: initialize Xlib ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Thu Jul 15 18:31:29 CEST 2010
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 15 19:26:43 2010 +0300| [28a58d398c8a2ed0d832fa7622ce000e85d6c226] | committer: Rémi Denis-Courmont
ASCII Art: initialize Xlib
Don't ask me why, but libaa depends on Xlib.
(cherry picked from commit d6d738ce6ec022d25c2dda2c12d9c194092230f4)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=28a58d398c8a2ed0d832fa7622ce000e85d6c226
---
configure.ac | 3 +++
modules/video_output/aa.c | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 83c5231..ad4a0c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3729,6 +3729,9 @@ then
then
VLC_ADD_PLUGIN([aa])
VLC_ADD_LIBS([aa],[-laa])
+ if test "${SYS}" != "mingw32"; then
+ VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
+ fi
fi
fi
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index b04468e..fe816ad 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -37,6 +37,13 @@
#include <assert.h>
#include <aalib.h>
+#ifndef WIN32
+# ifdef X_DISPLAY_MISSING
+# error Xlib required due to XInitThreads
+# endif
+# include <vlc_xlib.h>
+#endif
+
/* TODO
* - what about RGB palette ?
*/
@@ -85,6 +92,11 @@ static int Open(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+#ifndef WIN32
+ if (!vlc_xlib_init (object))
+ return VLC_EGENERIC;
+#endif
+
/* Allocate structure */
vd->sys = sys = calloc(1, sizeof(*sys));
if (!sys)
More information about the vlc-commits
mailing list