From ce03b42424c2e40a85ec7160ca9d3939cbde82d3 Mon Sep 17 00:00:00 2001 From: chainikdn Date: Sat, 21 Oct 2023 14:49:16 +0300 Subject: [PATCH] vf_vapoursynth: set nominal_fps after the filter --- video/filter/vf_vapoursynth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }