vf_vapoursynth: set nominal_fps after the filter

This commit is contained in:
chainikdn authored and Dudemanguy committed 2023-10-21 22:29:31 +00:00
1 parent 81102b0f6c
commit ce03b42424
1 file changed
+4 -1
+4 -1
View File
@@ -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);
}