This is for OpenGL support, where an app event listener expects to
receive this on the rendering thread to which a specific GL context is
bound.
// Remove the last frame
mlt_frame_close( frame );
// Remove the last frame
mlt_frame_close( frame );
+ // Wipe the queue
+ pthread_mutex_lock( &priv->queue_mutex );
+ while ( mlt_deque_count( priv->queue ) )
+ mlt_frame_close( mlt_deque_pop_back( priv->queue ) );
+
+ // Close the queue
+ mlt_deque_close( priv->queue );
+ priv->queue = NULL;
+ pthread_mutex_unlock( &priv->queue_mutex );
+
+ mlt_events_fire( MLT_CONSUMER_PROPERTIES(self), "consumer-thread-stopped", NULL );
+
// Destroy the condition
pthread_cond_destroy( &priv->queue_cond );
// Destroy the condition
pthread_cond_destroy( &priv->queue_cond );
-
- // Wipe the queue
- while ( mlt_deque_count( priv->queue ) )
- mlt_frame_close( mlt_deque_pop_back( priv->queue ) );
-
- // Close the queue
- mlt_deque_close( priv->queue );
-
- mlt_events_fire( MLT_CONSUMER_PROPERTIES(self), "consumer-thread-stopped", NULL );