]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_consumer.c
Feed rework and fixes to westley and composite
[mlt] / src / framework / mlt_consumer.c
index 20200962c1bea6c3c323bad38c440b7ca6ed18ea..32c76680561a44741ed4b0d03e4493f6f712b560 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;
 }
 
@@ -640,6 +639,9 @@ void mlt_consumer_close( mlt_consumer this )
                // Get the childs close function
                void ( *consumer_close )( ) = this->close;
 
+               // Just in case...
+               mlt_consumer_stop( this );
+
                // Make sure it only gets called once
                this->close = NULL;
                this->parent.close = NULL;