X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2Fconsumer_sdl.c;h=c75237e7d10eb0e824ee9760e3e676860115e8a9;hb=fc579010c07e3daa94db446a9623d9bb996892d2;hp=59196d2ec11fe43a0981659aedbe3eaff16a2661;hpb=cff2882f9c05cba4fe8ee8dfa6b8c14d80cfedf1;p=melted diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c index 59196d2..c75237e 100644 --- a/src/modules/sdl/consumer_sdl.c +++ b/src/modules/sdl/consumer_sdl.c @@ -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 );