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

Timo Rothenpieler git at videolan.org
Sat Jul 13 18:45:38 CEST 2013


vlc/vlc-2.0 | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sun Jan 20 15:49:23 2013 +0000| [4af258122d6aa36a3bdf1739da5b08b6e5706884] | committer: Denis Charmet

Make vaapi decoder compatible with latest libva changes

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit dc4b64c97b82d4d590ccf7fa1c938435cc26d98e)

Conflicts:
	modules/codec/avcodec/vaapi.c

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

 modules/codec/avcodec/vaapi.c |   51 ++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 30d5094..7036768 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -1,25 +1,25 @@
 /*****************************************************************************
- * vaapi.c: VAAPI helpers for the ffmpeg decoder
- *****************************************************************************
- * Copyright (C) 2009 Laurent Aimar
- * $Id$
- *
- * Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
+* vaapi.c: VAAPI helpers for the ffmpeg decoder
+*****************************************************************************
+* Copyright (C) 2009 Laurent Aimar
+* $Id$
+*
+* Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+*****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -45,6 +45,11 @@
 
 #include <libavcodec/vaapi.h>
 
+#ifndef VA_SURFACE_ATTRIB_SETTABLE
+#define vaCreateSurfaces(d, f, w, h, s, ns, a, na) \
+    vaCreateSurfaces(d, w, h, f, ns, s)
+#endif
+
 #include <X11/Xlib.h>
 #include <va/va_x11.h>
 
@@ -246,8 +251,8 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
 
     /* 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