diff --git a/src/video_provider_vs.cpp b/src/video_provider_vs.cpp index 8ecd621bb..bde0f9a70 100644 --- a/src/video_provider_vs.cpp +++ b/src/video_provider_vs.cpp @@ -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;