X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=3382d1190f8c97c15a0a46f6c134b6c070ee7851;hb=8ad18633ab01f630da1f09a3efd3acc1307b46e7;hp=db69aa6f83262d7678ad825679ec99aafaa2e68c;hpb=6b6dc5d0d724e083ef7f23d1f958e2ae94f312c2;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index db69aa6..3382d11 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -837,6 +837,8 @@ void mlt_producer_close( mlt_producer this ) } else { + int destroy = mlt_producer_is_cut( this ); + #if _MLT_PRODUCER_CHECKS_ == 1 // Show debug info mlt_properties_debug( MLT_PRODUCER_PROPERTIES( this ), "Producer closing", stderr ); @@ -851,6 +853,9 @@ void mlt_producer_close( mlt_producer this ) #endif mlt_service_close( &this->parent ); + + if ( destroy ) + free( this ); } } }