From: lilo_booter Date: Tue, 14 Dec 2004 22:44:20 +0000 (+0000) Subject: Mutex protection on put frame close X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=37e6bec1491c345e093e4bedc1ad241c78515d2f;p=melted Mutex protection on put frame close git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@561 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 2020096..6c85988 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -599,6 +599,11 @@ int mlt_consumer_stop( mlt_consumer this ) // Just in case... pthread_mutex_lock( &this->put_mutex ); + if ( this->put != NULL ) + { + mlt_frame_close( this->put ); + this->put = NULL; + } pthread_cond_broadcast( &this->put_cond ); pthread_mutex_unlock( &this->put_mutex ); @@ -609,12 +614,6 @@ int mlt_consumer_stop( mlt_consumer this ) if ( mlt_properties_get( properties, "post" ) ) system( mlt_properties_get( properties, "post" ) ); - if ( this->put != NULL ) - { - mlt_frame_close( this->put ); - this->put = NULL; - } - return 0; }