[vlc-devel] commit: Fix include order in VAAPI (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Jan 8 16:24:12 CET 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jan  8 16:18:54 2010 +0100| [14e3a156ff9f20ff17d7512fd07acd621f78adf0] | committer: Jean-Baptiste Kempf 

Fix include order in VAAPI

You cannot check HAVE_AVCODEC_VAAPI before including "avcodec.h"

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=14e3a156ff9f20ff17d7512fd07acd621f78adf0
---

 modules/codec/avcodec/vaapi.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index cb2a39a..0436bf1 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -31,9 +31,6 @@
 
 #ifdef HAVE_LIBAVCODEC_AVCODEC_H
 #   include <libavcodec/avcodec.h>
-#   ifdef HAVE_AVCODEC_VAAPI
-#       include <libavcodec/vaapi.h>
-#   endif
 #elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
@@ -45,10 +42,15 @@
 
 #ifdef HAVE_AVCODEC_VAAPI
 
+#if defined( HAVE_LIBAVCODEC_AVCODEC_H )
+#    include <libavcodec/vaapi.h>
+#else
+#    error "Missing VAAPI header"
+#endif
+
 #include <X11/Xlib.h>
 #include <va/va_x11.h>
 
-
 typedef struct
 {
     VASurfaceID  i_id;




More information about the vlc-devel mailing list