From faca3e7c1b56dcb2e26ee82d55ea55f4ee2316d3 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Thu, 3 Jun 2010 20:57:47 +0200 Subject: [PATCH] Check "xlib" before trying vaapi. --- modules/codec/avcodec/video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index b0b3a8e013..d88fc26261 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -1173,6 +1173,11 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec, /* Only VLD supported */ if( pi_fmt[i] == PIX_FMT_VAAPI_VLD ) { + if( !var_InheritBool( p_dec, "xlib" ) ) + { + msg_Warn( p_dec, "Ignoring VA API" ); + continue; + } #ifdef HAVE_AVCODEC_VAAPI msg_Dbg( p_dec, "Trying VA API" ); p_sys->p_va = vlc_va_NewVaapi( p_sys->i_codec_id ); -- 2.39.2