1
0
Fork 0

vapoursynth: Default to 25fps when no clip fps set

This matches the behavior of the FFMS video provider.
This commit is contained in:
arch1t3cht 2023-01-30 01:55:22 +01:00
parent 0d0ed49546
commit 88867d402c
1 changed files with 7 additions and 1 deletions

View File

@ -141,7 +141,13 @@ VapoursynthVideoProvider::VapoursynthVideoProvider(agi::fs::path const& filename
// Assume constant frame rate, since handling VFR would require going through all frames when loading.
// Users can load custom timecodes files to deal with VFR.
// Alternatively (TODO) the provider could read timecodes and keyframes from a second output node.
fps = agi::vfr::Framerate(vi->fpsNum, vi->fpsDen);
int fpsNum = vi->fpsNum;
int fpsDen = vi->fpsDen;
if (fpsDen == 0) {
fpsNum = 25;
fpsDen = 1;
}
fps = agi::vfr::Framerate(fpsNum, fpsDen);
// Find the first frame to get some info
const VSFrame *frame;