[vlc-commits] vaapi: use driver name (rather than VA-API ABI version) as description
Rémi Denis-Courmont
git at videolan.org
Sat Mar 22 19:46:22 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 22 20:42:25 2014 +0200| [d19f27a961200f486433657c2c835fd1d3e8df93] | committer: Rémi Denis-Courmont
vaapi: use driver name (rather than VA-API ABI version) as description
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d19f27a961200f486433657c2c835fd1d3e8df93
---
modules/codec/avcodec/vaapi.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index cd0a278..1190aef 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -150,7 +150,6 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count )
}
/* */
- va->description = NULL;
sys->i_config_id = VA_INVALID_ID;
sys->i_context_id = VA_INVALID_ID;
sys->image.image_id = VA_INVALID_ID;
@@ -190,9 +189,6 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count )
goto error;
}
- if( asprintf( &va->description, "VA API v%d.%d", major, minor ) < 0 )
- va->description = NULL;
-
/* Check if the selected profile is supported */
i_profiles_nb = vaMaxNumProfiles( sys->p_display );
p_profiles_list = calloc( i_profiles_nb, sizeof( VAProfile ) );
@@ -243,10 +239,10 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count )
vlc_mutex_init(&sys->lock);
va->sys = sys;
+ va->description = (char *)vaQueryVendorString( sys->p_display );
return VLC_SUCCESS;
error:
- free( va->description );
if( sys->p_display != NULL )
vaTerminate( sys->p_display );
#ifdef VLC_VA_BACKEND_XLIB
@@ -579,7 +575,6 @@ static void Delete( vlc_va_t *va )
{
vlc_va_sys_t *sys = va->sys;
Close( sys );
- free( va->description );
free( sys );
}
More information about the vlc-commits
mailing list