]> git.sesse.net Git - vlc/commitdiff
Check "xlib" before trying vaapi.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 3 Jun 2010 18:57:47 +0000 (20:57 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 3 Jun 2010 18:58:39 +0000 (20:58 +0200)
modules/codec/avcodec/video.c

index b0b3a8e01305619bc278376cd01c3a665b9c18ae..d88fc26261c6552134535f5ea0d0c997126fc1ec 100644 (file)
@@ -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 );