Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2013 03:48:16 GMT
From:      Geraud CONTINSOUZAS <geraud@gcu.info>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/180118: [PATCH] multimedia/vlc : fix build with VAAPI after libva update
Message-ID:  <201306300348.r5U3mGtx070301@oldred.freebsd.org>
Resent-Message-ID: <201306300350.r5U3o2x6024441@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180118
>Category:       ports
>Synopsis:       [PATCH] multimedia/vlc : fix build with VAAPI after libva update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 30 03:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Geraud CONTINSOUZAS
>Release:        9.1-STABLE
>Organization:
>Environment:
>Description:
The latest update of multimedia/libva introduces an API change making vlc crash when building.

>How-To-Repeat:
build vlc with VAAPI option.
>Fix:
See attached patch.

WARNING!

I am 100% C-illiterate. This patch comes after reading this commit in libva :

http://cgit.freedesktop.org/libva/commit/?id=824a70ae1ef79458e65079374209a0cb16b65c31

and I figured that they were just shuffling arguments around and adding two new ones at the end. I tried to apply the logic to vlc, rebuilt and it worked.

This is clearly a WORKSFORME patch. Unexpected results of applying this patch range from "this patch may eat your homework" to "this patch may end our civilization as we know it". I won't be held responsible for anything that happens. You have been warned!

Patch attached with submission follows:

--- /dev/null	2013-06-30 14:33:00.000000000 +1100
+++ multimedia/vlc/files/patch-modules-codec-avcodec-vaapi.c	2013-06-30 14:20:58.000000000 +1100
@@ -0,0 +1,13 @@
+--- modules/codec/avcodec/vaapi.c.orig	2013-01-22 20:51:40.000000000 +1100
++++ modules/codec/avcodec/vaapi.c	2013-06-30 14:19:48.000000000 +1100
+@@ -246,8 +246,8 @@
+ 
+     /* 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;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306300348.r5U3mGtx070301>