Skip to content

Commit

Permalink
Fix saving worker thread if success using priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Dec 18, 2018
1 parent 0e3ccf6 commit 0bf1f4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/framework/mlt_consumer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,12 @@ static void consumer_work_start( mlt_consumer self )

while ( n-- )
{
if ( pthread_create( thread, &thread_attributes, consumer_worker_thread, self ) < 0 )
if ( pthread_create( thread, &thread_attributes, consumer_worker_thread, self ) < 0 ) {
if ( pthread_create( thread, NULL, consumer_worker_thread, self ) == 0 )
mlt_deque_push_back( priv->worker_threads, thread );
} else {
mlt_deque_push_back( priv->worker_threads, thread );
}
thread++;
}
pthread_attr_destroy( &thread_attributes );
Expand Down

0 comments on commit 0bf1f4a

Please sign in to comment.