mirror of https://github.com/odrling/Aegisub
Default to 25 FPS if there are too few frames in a video to compute the FPS
Originally committed to SVN as r5683.
This commit is contained in:
parent
32463efb08
commit
62181365b9
|
@ -253,7 +253,10 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
|
||||||
int Timestamp = (int)((CurFrameData->PTS * TimeBase->Num) / TimeBase->Den);
|
int Timestamp = (int)((CurFrameData->PTS * TimeBase->Num) / TimeBase->Den);
|
||||||
TimecodesVector.push_back(Timestamp);
|
TimecodesVector.push_back(Timestamp);
|
||||||
}
|
}
|
||||||
Timecodes = agi::vfr::Framerate(TimecodesVector);
|
if (TimecodesVector.size() < 2)
|
||||||
|
Timecodes = 25.0;
|
||||||
|
else
|
||||||
|
Timecodes = agi::vfr::Framerate(TimecodesVector);
|
||||||
|
|
||||||
FrameNumber = 0;
|
FrameNumber = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue