summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-03 23:11:24 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-03 14:51:33 -0800
commite34c5dc17c500b4b030b02255bb74012879d0ab1 (patch)
tree2103c6ce489a5eb78996de2e7e9c8af0a7ceb4b5
parentf4f24c105f9c132e84cba9a9707acc261033a816 (diff)
downloadmpv-e34c5dc17c500b4b030b02255bb74012879d0ab1.tar.bz2
mpv-e34c5dc17c500b4b030b02255bb74012879d0ab1.tar.xz
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.
-rw-r--r--video/filter/vf_vapoursynth.c3
1 files changed, 2 insertions, 1 deletions
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;