]> git.sesse.net Git - mlt/blobdiff - src/mlt++/MltFilteredProducer.cpp
Fix crash removing filter attached to a service.
[mlt] / src / mlt++ / MltFilteredProducer.cpp
index 105db9655927e18e85fbcd95188a66a83eaa19e3..87d1025b3d3144224f6ed654038b1a75b7a66bf6 100644 (file)
  */
 
 #include "MltFilteredProducer.h"
+#include "MltProfile.h"
 using namespace Mlt;
 
-FilteredProducer::FilteredProducer( Profile& profile, char *id, char *arg ) :
+FilteredProducer::FilteredProducer( Profile& profile, const char *id, const char *arg ) :
        Producer( profile, id, arg )
 {
        // Create a reference to the last service
@@ -71,7 +72,8 @@ int FilteredProducer::detach( Filter &filter )
                        Service *consumer = it->consumer( );
                        if ( consumer->is_valid( ) )
                                consumer->connect_producer( *producer );
-                       Producer dummy( "colour" );
+                       Profile p( get_profile() );
+                       Producer dummy( p, "colour" );
                        dummy.connect_producer( *it );
                        if ( last->get_service( ) == it->get_service( ) )
                        {