]> git.sesse.net Git - mlt/commitdiff
Let environment variable MLT_NO_VDPAU=1 disable VDPAU.
authorDan Dennedy <dan@dennedy.org>
Fri, 22 Jan 2010 03:53:32 +0000 (19:53 -0800)
committerDan Dennedy <dan@dennedy.org>
Fri, 22 Jan 2010 03:53:32 +0000 (19:53 -0800)
src/modules/avformat/producer_avformat.c
src/modules/avformat/vdpau.c

index e4a7438a5a47dba1bf346ead8f9363b47a7cbff1..b3b4dca243518ccb1e87464ec0c85ce96621248b 100644 (file)
@@ -47,7 +47,6 @@
 #include <string.h>
 #include <pthread.h>
 #include <limits.h>
-#include <dlfcn.h>
 
 #if LIBAVUTIL_VERSION_INT < (50<<16)
 #define PIX_FMT_RGB32 PIX_FMT_RGBA32
index b3fd5317b0375fc14157360886b63ca4e1014f9e..db3beb593962da963d3b541b9d73005ba97509b3 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <vdpau.h>
 #include <X11/Xlib.h>
+#include <dlfcn.h>
 
 extern pthread_mutex_t mlt_sdl_mutex;
 
@@ -53,7 +54,8 @@ static int vdpau_init( producer_avformat this )
        mlt_properties properties = MLT_PRODUCER_PROPERTIES( this->parent );
        Display *display = XOpenDisplay( NULL );
        
-       if ( !display || mlt_properties_get_int( properties, "novdpau" ) )
+       if ( !display || mlt_properties_get_int( properties, "novdpau" )
+            || ( getenv( "MLT_NO_VDPAU" ) && strcmp( getenv( "MLT_NO_VDPAU" ), "1" ) == 0 ) )
                return success;
 
        if ( !g_vdpau )