]> git.sesse.net Git - mlt/commitdiff
Fix regression in commit f26c43f.
authorDan Dennedy <dan@dennedy.org>
Fri, 4 Oct 2013 05:30:29 +0000 (22:30 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 4 Oct 2013 05:30:29 +0000 (22:30 -0700)
src/framework/mlt_consumer.c

index 8ae3968029f19ddec695244191e2f85c598dcc52..5c640f29d128a68350b9557931a7275816dd341d 100644 (file)
@@ -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 )