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:
Thomas Goyne 2011-09-29 20:27:23 +00:00
parent 32463efb08
commit 62181365b9

View file

@ -253,6 +253,9 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
int Timestamp = (int)((CurFrameData->PTS * TimeBase->Num) / TimeBase->Den);
TimecodesVector.push_back(Timestamp);
}
if (TimecodesVector.size() < 2)
Timecodes = 25.0;
else
Timecodes = agi::vfr::Framerate(TimecodesVector);
FrameNumber = 0;