Dominique Leuenberger 2013-07-15 12:19:42 +00:00 committed by Git OBS Bridge
parent 5b2b48c004
commit 3a63c24041

View File

@ -10,12 +10,20 @@ Index: vlc-2.0.7/modules/codec/avcodec/vaapi.c
=================================================================== ===================================================================
--- vlc-2.0.7.orig/modules/codec/avcodec/vaapi.c --- vlc-2.0.7.orig/modules/codec/avcodec/vaapi.c
+++ vlc-2.0.7/modules/codec/avcodec/vaapi.c +++ vlc-2.0.7/modules/codec/avcodec/vaapi.c
@@ -246,8 +246,14 @@ static int CreateSurfaces( vlc_va_vaapi_ @@ -46,6 +46,7 @@
#include <libavcodec/vaapi.h>
#include <X11/Xlib.h>
+#include <va/va_version.h>
#include <va/va_x11.h>
typedef struct
@@ -246,8 +247,14 @@ static int CreateSurfaces( vlc_va_vaapi_
/* Create surfaces */ /* Create surfaces */
VASurfaceID pi_surface_id[p_va->i_surface_count]; VASurfaceID pi_surface_id[p_va->i_surface_count];
+/* vaCreateSurfaces API changed with version 1.2.0 */ +/* vaCreateSurfaces API changed with version 1.2.0 */
+#if VA_CHECK_VERSION(1,2,0) +#if VA_CHECK_VERSION( 0, 34, 0 )
+ if( vaCreateSurfaces( p_va->p_display, VA_RT_FORMAT_YUV420, i_width, i_height, + if( vaCreateSurfaces( p_va->p_display, VA_RT_FORMAT_YUV420, i_width, i_height,
+ pi_surface_id, p_va->i_surface_count, NULL, 0 ) ) + pi_surface_id, p_va->i_surface_count, NULL, 0 ) )
+#else +#else