]> git.sesse.net Git - mlt/commitdiff
Use the shared ResourcePool also for ad-hoc EffectChains.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Apr 2014 20:21:38 +0000 (22:21 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Apr 2014 20:26:25 +0000 (22:26 +0200)
We sometimes create an EffectChain just to get a temporary MLT image
into Movit. This, like any other, should use the ResourcePool.

A side-effect of this is that it serves as a temporary workaround
for Kdenlive bug 3253, since it delays the destruction of the
ResourcePool until the end of the program.

src/modules/opengl/filter_movit_convert.cpp

index 40229ab529514ea138ded4e2620a5d553ab0486d..1c95bfefbec106f437083224b0cbc2d7d0c6e0c2 100644 (file)
@@ -498,7 +498,7 @@ static int convert_image( mlt_frame frame, uint8_t **image, mlt_image_format *fo
                        int h = producer.get_int( "movit.convert.height" );
                        mlt_image_format f = (mlt_image_format) producer.get_int( "movit.convert.format" );
                        if ( !chain || !input || width != w || height != h || *format != f ) {
-                               chain = new EffectChain( width, height );
+                               chain = new EffectChain( width, height, GlslManager::get_instance()->get_resource_pool() );
                                input = create_input( properties, *format, width, height, width, height );
                                chain->add_input( input->get_input() );
                                chain->add_effect( new Mlt::VerticalFlip() );