mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 21:52:12 +00:00
vf_vapoursynth: allow multithreaded writing of source frames
This commit is contained in:
parent
5907bc023c
commit
7f0f1a1b72
@ -536,11 +536,14 @@ static const VSFrameRef *VS_CC infiltGetFrame(int frameno, int activationReason,
|
||||
p->vsapi->setFilterError("Could not allocate VS frame", frameCtx);
|
||||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&p->lock);
|
||||
struct mp_image vsframe = map_vs_frame(p, ret, true);
|
||||
mp_image_copy(&vsframe, img);
|
||||
int res = 1e6;
|
||||
int dur = img->pkt_duration * res + 0.5;
|
||||
set_vs_frame_props(p, ret, img, dur, res);
|
||||
pthread_mutex_lock(&p->lock);
|
||||
break;
|
||||
}
|
||||
pthread_cond_wait(&p->wakeup, &p->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user