+void consumer_purge( mlt_consumer parent )
+{
+ consumer_sdl self = parent->child;
+ if ( self->running )
+ {
+ pthread_mutex_lock( &self->video_mutex );
+ while ( mlt_deque_count( self->queue ) )
+ mlt_frame_close( mlt_deque_pop_back( self->queue ) );
+ self->is_purge = 1;
+ pthread_cond_broadcast( &self->video_cond );
+ pthread_mutex_unlock( &self->video_mutex );
+ }
+}
+