fix
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/vlc?expand=0&rev=22
This commit is contained in:
parent
652a86fcc9
commit
5b2b48c004
@ -10,26 +10,18 @@ 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
|
||||||
@@ -45,6 +45,11 @@
|
@@ -246,8 +246,14 @@ static int CreateSurfaces( vlc_va_vaapi_
|
||||||
|
|
||||||
#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_
|
|
||||||
|
|
||||||
/* Create surfaces */
|
/* Create surfaces */
|
||||||
VASurfaceID pi_surface_id[p_va->i_surface_count];
|
VASurfaceID pi_surface_id[p_va->i_surface_count];
|
||||||
- if( vaCreateSurfaces( p_va->p_display, i_width, i_height, VA_RT_FORMAT_YUV420,
|
+/* vaCreateSurfaces API changed with version 1.2.0 */
|
||||||
- p_va->i_surface_count, pi_surface_id ) )
|
+#if VA_CHECK_VERSION(1,2,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
|
||||||
|
if( vaCreateSurfaces( p_va->p_display, i_width, i_height, VA_RT_FORMAT_YUV420,
|
||||||
|
p_va->i_surface_count, pi_surface_id ) )
|
||||||
|
+#endif
|
||||||
{
|
{
|
||||||
for( int i = 0; i < p_va->i_surface_count; i++ )
|
for( int i = 0; i < p_va->i_surface_count; i++ )
|
||||||
p_va->p_surface[i].i_id = VA_INVALID_SURFACE;
|
p_va->p_surface[i].i_id = VA_INVALID_SURFACE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user