Commit c6e66595 authored by Janne Grunau's avatar Janne Grunau

fix hang in dav1d_close() with more than 31 tile threads

Fix 122.
parent 8d5a8121
......@@ -260,7 +260,7 @@ void dav1d_close(Dav1dContext **const c_out) {
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment