ref: 8c71f0f0d3789b796540fec33641125f187537dd
parent: 095cc7b2a007ca22ece128d6e764c9598e7d1f83
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Sep 7 05:51:49 EDT 2020
fix threads
--- a/src/av19.c
+++ b/src/av19.c
@@ -34,7 +34,7 @@
int mainstacksize = 512*1024;
enum {
- Maxframes = 4,
+ Maxframes = 1,
};
static Player *curplayer;
@@ -263,8 +263,8 @@
}
dav1d_default_settings(&av1s);
- av1s.n_frame_threads = 1; // FIXME threads
- av1s.n_tile_threads = 1; // FIXME threads
+ av1s.n_frame_threads = 4; // FIXME threads
+ av1s.n_tile_threads = 4; // FIXME threads
if(dav1d_open(&p->c, &av1s) != 0){
werrstr("dav1d_open");
--- a/src/plan9_thread.c
+++ b/src/plan9_thread.c
@@ -106,11 +106,11 @@
int
pthread_cond_wait(pthread_cond_t *const cond, pthread_mutex_t *const mutex)
{
- qlock(cond->l);
qunlock(mutex);
+ qlock(cond->l);
rsleep(cond);
- qlock(mutex);
qunlock(cond->l);
+ qlock(mutex);
return 0;
}