From e8616fea50ed6814b5f5ad5ebb1f1f9674819e9f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 Jul 2014 17:02:37 +0200 Subject: [PATCH] vf_vapoursynth: reset error state on seeking When seeking, we violently destroy the filter, because vapoursynth has no proper API for terminating a video with unknown frame count. This looks like an error to vapoursynth, and the error is returned via the frame callbacks. The bug is that we remember this error state across reinitialization, so on the first filter call after reinitialization, we thought filtering the current frame failed. This caused a shift by 1 frame on each seek. CC: @mpv-player/stable --- video/filter/vf_vapoursynth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 8af3d02bb0..5e104bb49c 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -434,6 +434,7 @@ static void destroy_vs(struct vf_instance *vf) p->next_image = NULL; p->out_pts = MP_NOPTS_VALUE; p->out_frameno = p->in_frameno = 0; + p->failed = false; MP_DBG(vf, "uninitialized.\n"); }