[vlc-commits] Make vaapi decoder compatible with latest libva changes

Timo Rothenpieler git at videolan.org
Tue Jul 2 18:35:51 CEST 2013


vlc | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sun Jan 20 15:49:23 2013 +0000| [dc4b64c97b82d4d590ccf7fa1c938435cc26d98e] | committer: Jean-Baptiste Kempf

Make vaapi decoder compatible with latest libva changes

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/avcodec/vaapi.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 893ea15..d8703a0 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -41,6 +41,11 @@
 #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;



More information about the vlc-commits mailing list