]> git.sesse.net Git - mlt/commitdiff
Mutex protection on put frame close
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 14 Dec 2004 22:44:20 +0000 (22:44 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 14 Dec 2004 22:44:20 +0000 (22:44 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@561 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_consumer.c

index 20200962c1bea6c3c323bad38c440b7ca6ed18ea..6c859888557f7f8b779a3106b4e2390a7e7ff0e7 100644 (file)
@@ -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;
 }