mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02: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);
|
p->vsapi->setFilterError("Could not allocate VS frame", frameCtx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&p->lock);
|
||||||
struct mp_image vsframe = map_vs_frame(p, ret, true);
|
struct mp_image vsframe = map_vs_frame(p, ret, true);
|
||||||
mp_image_copy(&vsframe, img);
|
mp_image_copy(&vsframe, img);
|
||||||
int res = 1e6;
|
int res = 1e6;
|
||||||
int dur = img->pkt_duration * res + 0.5;
|
int dur = img->pkt_duration * res + 0.5;
|
||||||
set_vs_frame_props(p, ret, img, dur, res);
|
set_vs_frame_props(p, ret, img, dur, res);
|
||||||
|
pthread_mutex_lock(&p->lock);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pthread_cond_wait(&p->wakeup, &p->lock);
|
pthread_cond_wait(&p->wakeup, &p->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user