]> git.sesse.net Git - mlt/commitdiff
SDL fixes on close
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 23 Dec 2003 14:12:51 +0000 (14:12 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 23 Dec 2003 14:12:51 +0000 (14:12 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@14 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt/src/modules/sdl/consumer_sdl.c
mlt/src/tests/charlie.c
mlt/src/tests/dan.c
src/modules/sdl/consumer_sdl.c
src/tests/charlie.c
src/tests/dan.c

index 59196d2ec11fe43a0981659aedbe3eaff16a2661..c75237e7d10eb0e824ee9760e3e676860115e8a9 100644 (file)
@@ -351,8 +351,12 @@ static void consumer_close( mlt_consumer parent )
 
        // 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 );
                
index 95935cb4b29901a41a98bb1890f4797532170ec2..65f509945837d1a36c9999465592627e9d7e1dd1 100644 (file)
@@ -81,6 +81,10 @@ int main( int argc, char **argv )
        // 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 );
index d22f0a91867701b3c877d47ca4e736bec0da8b77..cdfd211839fd7e7247bc8837a04ef1428f692f00 100644 (file)
@@ -71,11 +71,11 @@ int main( int argc, char **argv )
 
        // 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;
 }
index 59196d2ec11fe43a0981659aedbe3eaff16a2661..c75237e7d10eb0e824ee9760e3e676860115e8a9 100644 (file)
@@ -351,8 +351,12 @@ static void consumer_close( mlt_consumer parent )
 
        // 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 );
                
index 95935cb4b29901a41a98bb1890f4797532170ec2..65f509945837d1a36c9999465592627e9d7e1dd1 100644 (file)
@@ -81,6 +81,10 @@ int main( int argc, char **argv )
        // 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 );
index d22f0a91867701b3c877d47ca4e736bec0da8b77..cdfd211839fd7e7247bc8837a04ef1428f692f00 100644 (file)
@@ -71,11 +71,11 @@ int main( int argc, char **argv )
 
        // 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;
 }