summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-01 10:17:47 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-03 05:01:30 -0800
commit60d3327b0baac267966645a61d641672e0f4cb47 (patch)
treedf718023d41d9667794c0d07320320ee531813e1
parenta4392168f99e5ef27fd0e078578baf2fd29bdd70 (diff)
downloadmpv-60d3327b0baac267966645a61d641672e0f4cb47.tar.bz2
mpv-60d3327b0baac267966645a61d641672e0f4cb47.tar.xz
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.
-rw-r--r--video/filter/vf_vapoursynth.c2
1 files changed, 1 insertions, 1 deletions
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");