X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_consumer.c;h=a07f72d10ca9d5dfb1a688597c0d4577a2c9d530;hb=3bde0c8a0c130db6d3849a94f60d5b5ad234246e;hp=1b67b7414516d048c1b4ea9fcc1d153e14616bd9;hpb=b59235cf232be9d06a0eef478e0cd4a93a36cb58;p=melted diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 1b67b74..a07f72d 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -422,6 +422,18 @@ static void consumer_read_ahead_stop( mlt_consumer this ) } } +void mlt_consumer_purge( mlt_consumer this ) +{ + if ( this->ahead ) + { + pthread_mutex_lock( &this->mutex ); + while ( mlt_deque_count( this->queue ) ) + mlt_frame_close( mlt_deque_pop_back( this->queue ) ); + pthread_cond_broadcast( &this->cond ); + pthread_mutex_unlock( &this->mutex ); + } +} + mlt_frame mlt_consumer_rt_frame( mlt_consumer this ) { // Frame to return