From 7f0f1a1b72905f4175dfc095d23e224585932865 Mon Sep 17 00:00:00 2001 From: Chainik Date: Tue, 30 Oct 2018 15:55:31 +0300 Subject: vf_vapoursynth: allow multithreaded writing of source frames --- video/filter/vf_vapoursynth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 449086b01f..4227ee6fa6 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -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); -- cgit v1.2.3