From 60d3327b0baac267966645a61d641672e0f4cb47 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Feb 2018 10:17:47 +0100 Subject: vf_vapoursynth: initialize start timestamp properly VapourSynth can't pass through timestamps, only frame durations. So we need to remember the timestamp of the very first frame passed to it. This was accidentally set to 0 instead of NOPTS on init, so inserting the filter during playback could show strange behavior. Might be part of #5470. --- video/filter/vf_vapoursynth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/filter/vf_vapoursynth.c') diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 4de09794e6..c173265fc5 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -602,7 +602,6 @@ static void destroy_vs(struct priv *p) for (int n = 0; n < p->num_buffered; n++) talloc_free(p->buffered[n]); p->num_buffered = 0; - p->out_pts = MP_NOPTS_VALUE; p->out_frameno = p->in_frameno = 0; p->requested_frameno = 0; p->failed = false; @@ -626,6 +625,7 @@ static int reinit_vs(struct priv *p) } p->initializing = true; + p->out_pts = MP_NOPTS_VALUE; if (p->drv->load_core(p) < 0 || !p->vsapi || !p->vscore) { MP_FATAL(p, "Could not get vapoursynth API handle.\n"); -- cgit v1.2.3