vapoursynth: Default to 25fps when no clip fps set
This matches the behavior of the FFMS video provider.
This commit is contained in:
parent
0d0ed49546
commit
88867d402c
1 changed files with 7 additions and 1 deletions
|
@ -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.
|
// 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.
|
// Users can load custom timecodes files to deal with VFR.
|
||||||
// Alternatively (TODO) the provider could read timecodes and keyframes from a second output node.
|
// 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
|
// Find the first frame to get some info
|
||||||
const VSFrame *frame;
|
const VSFrame *frame;
|
||||||
|
|
Loading…
Reference in a new issue