VAAPI: for libva >= 0.31.0 remove context from vaSyncSurface.
authorKonstantin Pavlov <thresh@altlinux.org>
Fri, 9 Oct 2009 08:36:14 +0000 (12:36 +0400)
committerKonstantin Pavlov <thresh@altlinux.org>
Fri, 16 Oct 2009 07:32:20 +0000 (11:32 +0400)
Follows
http://cgit.freedesktop.org/libva/commit/?id=2822d025263d516bd619c8bbe1d17ff4c1bd1af2

modules/codec/avcodec/vaapi.c

index a9d4c6f..05a82c3 100644 (file)
@@ -344,7 +344,11 @@ int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
 {
     VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
 
+#if VA_CHECK_VERSION(0,31,0)
+    if( vaSyncSurface( p_va->p_display, i_surface_id ) )
+#else
     if( vaSyncSurface( p_va->p_display, p_va->i_context_id, i_surface_id ) )
+#endif
         return VLC_EGENERIC;
 
     /* XXX vaDeriveImage may be better but it is not supported by