ref: c6e66595a8f553f348f19b60b8326aac536f00ad
parent: 8d5a812190ce13b329d3b0f826d78f8aaa503714
author: Janne Grunau <janne-vlc@jannau.net>
date: Sat Oct 27 16:37:33 EDT 2018
fix hang in dav1d_close() with more than 31 tile threads Fix 122.
--- a/src/lib.c
+++ b/src/lib.c
@@ -260,7 +260,7 @@
t->tile_thread.die = 1;
}
pthread_cond_broadcast(&f->tile_thread.cond);
- while (f->tile_thread.available != (1U << f->n_tc) - 1)
+ while (f->tile_thread.available != ~0ULL >> (64 - f->n_tc))
pthread_cond_wait(&f->tile_thread.icond,
&f->tile_thread.lock);
pthread_mutex_unlock(&f->tile_thread.lock);