]> git.sesse.net Git - vlc/commitdiff
Make vaapi decoder compatible with latest libva changes
authorTimo Rothenpieler <timo@rothenpieler.org>
Sun, 20 Jan 2013 15:49:23 +0000 (15:49 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 2 Jul 2013 16:35:17 +0000 (18:35 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/avcodec/vaapi.c

index 893ea153131765bc98e6c51baf66c482cd24e8eb..d8703a02b852d6091b9538b49f1c703b6af0c08b 100644 (file)
 #include "va.h"
 #include "copy.h"
 
+#ifndef VA_SURFACE_ATTRIB_SETTABLE
+#define vaCreateSurfaces(d, f, w, h, s, ns, a, na) \
+    vaCreateSurfaces(d, w, h, f, ns, s)
+#endif
+
 static int Create( vlc_va_t *, int, const es_format_t * );
 static void Delete( vlc_va_t * );
 
@@ -258,8 +263,8 @@ static int CreateSurfaces( vlc_va_sys_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *p
 
     /* Create surfaces */
     VASurfaceID pi_surface_id[p_va->i_surface_count];
-    if( vaCreateSurfaces( p_va->p_display, i_width, i_height, VA_RT_FORMAT_YUV420,
-                          p_va->i_surface_count, pi_surface_id ) )
+    if( vaCreateSurfaces( p_va->p_display, VA_RT_FORMAT_YUV420, i_width, i_height,
+                          pi_surface_id, p_va->i_surface_count, NULL, 0 ) )
     {
         for( int i = 0; i < p_va->i_surface_count; i++ )
             p_va->p_surface[i].i_id = VA_INVALID_SURFACE;