forked from mia/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
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue