MCPcopy Create free account
hub / github.com/FFMS/ffms2 / CorrectTimebase

Function CorrectTimebase

src/core/videoutils.cpp:98–105  ·  view source on GitHub ↗

correct the timebase if it is invalid

Source from the content-addressed store, hash-verified

96
97// correct the timebase if it is invalid
98void CorrectTimebase(FFMS_VideoProperties *VP, FFMS_TrackTimeBase *TTimebase) {
99 double Timebase = (double)TTimebase->Num / TTimebase->Den;
100 double FPS = (double)VP->FPSNumerator / VP->FPSDenominator;
101 if ((1000 / Timebase) / FPS < 1) {
102 TTimebase->Den = VP->FPSNumerator;
103 TTimebase->Num = (int64_t)VP->FPSDenominator * 1000;
104 }
105}
106
107/***************************
108**

Callers 1

SetVideoPropertiesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected