From e34c5dc17c500b4b030b02255bb74012879d0ab1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 3 Feb 2018 23:11:24 +0100 Subject: [PATCH] vf_vapoursynth: fix locking This was obviously nonsense, and a previous "fix" to this code was nonsense too. What is really needed here is temporarily dropping the lock while calling destroy_vs()/reinit_vs(). Fixes #5470. --- video/filter/vf_vapoursynth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index d58433a4b5..3779400d9f 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -369,8 +369,9 @@ static void vf_vapoursynth_process(struct mp_filter *f) if (reinit_vs(p) < 0) { MP_ERR(p, "could not init VS\n"); mp_frame_unref(&frame); - goto done; + return; } + pthread_mutex_lock(&p->lock); } if (p->out_pts == MP_NOPTS_VALUE) p->out_pts = mpi->pts;