X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_consumer.c;h=268a5e60708fcb4d9e7697ebb75ef8a9eb275152;hb=7cef152403bfa0ea30e4a3e102fe33bc75e508ab;hp=87d9e9de438c755c32df73a3d8dc3215c617a24b;hpb=945a27e179cc4d1290b488a5b7cba466f06d009b;p=melted diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 87d9e9d..268a5e6 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -235,8 +235,11 @@ mlt_frame mlt_consumer_get_frame( mlt_consumer this ) // Get the service assoicated to the consumer mlt_service service = mlt_consumer_service( this ); + // Get the consumer properties + mlt_properties properties = mlt_consumer_properties( this ); + // Get the frame - if ( mlt_service_producer( service ) == NULL ) + if ( mlt_service_producer( service ) == NULL && mlt_properties_get_int( properties, "put_mode" ) ) { pthread_mutex_lock( &this->put_mutex ); if ( this->put == NULL ) @@ -251,9 +254,6 @@ mlt_frame mlt_consumer_get_frame( mlt_consumer this ) if ( frame != NULL || mlt_service_get_frame( service, &frame, 0 ) == 0 ) { - // Get the consumer properties - mlt_properties properties = mlt_consumer_properties( this ); - // Get the frame properties mlt_properties frame_properties = mlt_frame_properties( frame ); @@ -579,6 +579,12 @@ 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; }