summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vapoursynth.c
diff options
context:
space:
mode:
authorchainikdn <chainik.dn@gmail.com>2023-10-21 14:49:16 +0300
committerDudemanguy <random342@airmail.cc>2023-10-21 22:29:31 +0000
commitce03b42424c2e40a85ec7160ca9d3939cbde82d3 (patch)
tree8fada184096fe5d0d22bc57338f0e1bf315ca106 /video/filter/vf_vapoursynth.c
parent81102b0f6c7db956cd222ea3e81debda36de5a78 (diff)
downloadmpv-ce03b42424c2e40a85ec7160ca9d3939cbde82d3.tar.bz2
mpv-ce03b42424c2e40a85ec7160ca9d3939cbde82d3.tar.xz
vf_vapoursynth: set nominal_fps after the filter
Diffstat (limited to 'video/filter/vf_vapoursynth.c')
-rw-r--r--video/filter/vf_vapoursynth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c
index 861c4457bd..1183d90e8b 100644
--- a/video/filter/vf_vapoursynth.c
+++ b/video/filter/vf_vapoursynth.c
@@ -280,8 +280,11 @@ static void VS_CC vs_frame_done(void *userData, const VSFrameRef *f, int n,
if (!err1 && !err2)
img.pkt_duration = num / (double)den;
}
- if (img.pkt_duration < 0)
+ if (img.pkt_duration < 0) {
MP_ERR(p, "No PTS after filter at frame %d!\n", n);
+ } else {
+ img.nominal_fps = 1.0 / img.pkt_duration;
+ }
res = mp_image_new_copy(&img);
p->vsapi->freeFrame(f);
}