{
consumer_private *priv = self->local;
+ if ( priv->started )
+ return;
+
// We're running now
priv->ahead = 1;
{
consumer_private *priv = self->local;
int n = abs( priv->real_time );
- pthread_t *thread = calloc( 1, sizeof( pthread_t ) * n );
+ pthread_t *thread;
+
+ if ( priv->started )
+ return;
+
+ thread = calloc( 1, sizeof( pthread_t ) * n );
// We're running now
priv->ahead = 1;
mlt_log( MLT_CONSUMER_SERVICE( self ), MLT_LOG_DEBUG, "stopping consumer\n" );
// Cancel the read ahead threads
- priv->ahead = 0;
if ( priv->started )
{
// Unblock the consumer calling mlt_consumer_rt_frame