From: Dan Dennedy Date: Fri, 4 Oct 2013 05:30:29 +0000 (-0700) Subject: Fix regression in commit f26c43f. X-Git-Url: https://git.sesse.net/?p=mlt;a=commitdiff_plain;h=af847be9c8b4ba034f16b7186bef138d2cddfb3f Fix regression in commit f26c43f. --- diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 8ae39680..5c640f29 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -1295,15 +1295,15 @@ void mlt_consumer_purge( mlt_consumer self ) if ( self->purge ) self->purge( self ); - pthread_mutex_lock( &priv->queue_mutex ); + if ( priv->started && priv->real_time ) + pthread_mutex_lock( &priv->queue_mutex ); + while ( priv->started && mlt_deque_count( priv->queue ) ) mlt_frame_close( mlt_deque_pop_back( priv->queue ) ); - pthread_mutex_unlock( &priv->queue_mutex ); if ( priv->started && priv->real_time ) { priv->is_purge = 1; - pthread_mutex_lock( &priv->queue_mutex ); pthread_cond_broadcast( &priv->queue_cond ); pthread_mutex_unlock( &priv->queue_mutex ); if ( abs( priv->real_time ) > 1 )