mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
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.
This commit is contained in:
parent
a4392168f9
commit
60d3327b0b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user