]> git.sesse.net Git - mlt/commitdiff
Prevent making consumer qglsl if glslManager already exists.
authorDan Dennedy <dan@dennedy.org>
Mon, 31 Mar 2014 03:23:54 +0000 (20:23 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 31 Mar 2014 03:23:54 +0000 (20:23 -0700)
With Qt 4 version of qt module, if -consumer qglsl was specified on melt
command line, then the xml would not load without specifying "xml-nogl"
as the service for the resource. This prevents the need to invoke that.

src/modules/xml/producer_xml.c

index 086657f4263d6ab9f7363c7a25c7ed8f24dae35e..fdaa7deeb3cfb9a308aa7f5b634e6d1d715ef0f4 100644 (file)
@@ -1751,7 +1751,9 @@ mlt_producer producer_xml_init( mlt_profile profile, mlt_service_type servtype,
        // may exist when trying to load glsl. or movit. services.
        // The "if requested" part can come from query string qglsl=1 or when
        // a service beginning with glsl. or movit. appears in the XML.
-       if ( mlt_properties_get_int( context->params, "qglsl" ) && strcmp( id, "xml-nogl" ) )
+       if ( mlt_properties_get_int( context->params, "qglsl" ) && strcmp( id, "xml-nogl" )
+               // Only if glslManager does not yet exist.
+               && !mlt_properties_get_data( mlt_global_properties(), "glslManager", NULL ) )
                context->qglsl = mlt_factory_consumer( profile, "qglsl", NULL );
 
        // Setup SAX callbacks for second pass