// Kill the thread and clean up
this->running = 0;
- pthread_join( this->thread, NULL );
+ pthread_mutex_lock( &this->audio_mutex );
+ pthread_cond_broadcast( &this->audio_cond );
+ pthread_mutex_unlock( &this->audio_mutex );
+
+ pthread_join( this->thread, NULL );
pthread_mutex_destroy( &this->audio_mutex );
pthread_cond_destroy( &this->audio_cond );
// Transport functionality
transport( producer );
+ // Close the services
+ mlt_consumer_close( consumer );
+ mlt_producer_close( producer );
+
/*
// Create the producer(s)
mlt_producer dv1 = mlt_factory_producer( "mcmpeg", file1 );
// Close everything...
mlt_consumer_close( consumer );
- //mlt_tractor_close( tractor );
+ mlt_tractor_close( tractor );
//mlt_filter_close( filter );
- //mlt_multitrack_close( multitrack );
- //mlt_producer_close( dv1 );
- //mlt_producer_close( dv2 );
+ mlt_multitrack_close( multitrack );
+ mlt_producer_close( dv1 );
+ mlt_producer_close( dv2 );
return 0;
}
// Kill the thread and clean up
this->running = 0;
- pthread_join( this->thread, NULL );
+ pthread_mutex_lock( &this->audio_mutex );
+ pthread_cond_broadcast( &this->audio_cond );
+ pthread_mutex_unlock( &this->audio_mutex );
+
+ pthread_join( this->thread, NULL );
pthread_mutex_destroy( &this->audio_mutex );
pthread_cond_destroy( &this->audio_cond );
// Transport functionality
transport( producer );
+ // Close the services
+ mlt_consumer_close( consumer );
+ mlt_producer_close( producer );
+
/*
// Create the producer(s)
mlt_producer dv1 = mlt_factory_producer( "mcmpeg", file1 );
// Close everything...
mlt_consumer_close( consumer );
- //mlt_tractor_close( tractor );
+ mlt_tractor_close( tractor );
//mlt_filter_close( filter );
- //mlt_multitrack_close( multitrack );
- //mlt_producer_close( dv1 );
- //mlt_producer_close( dv2 );
+ mlt_multitrack_close( multitrack );
+ mlt_producer_close( dv1 );
+ mlt_producer_close( dv2 );
return 0;
}