vf_vapoursynth: set nominal_fps after the filter

This commit is contained in:
chainikdn 2023-10-21 14:49:16 +03:00 committed by Dudemanguy
parent 81102b0f6c
commit ce03b42424
1 changed files with 4 additions and 1 deletions

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);
}