Work around bug #772, v1 timecodes files with overlapping or out of order ranges caused weird behaviour. Now those files are simply rejected.

Originally committed to SVN as r2339.
This commit is contained in:
Niels Martin Hansen 2008-09-10 20:52:51 +00:00
parent a631b76684
commit d92efd1f54
1 changed files with 3 additions and 0 deletions

View File

@ -151,6 +151,9 @@ void FrameRate::Load(wxString filename) {
if (!temp.ToDouble(&lfps) || lfps <= 0)
throw _T("Timecode parsing error, invalid fps format found");
if (lstart <= lposition)
throw _T("Timecode parsing error, out of order or overlapping timecode range found");
for (int i = 0; i <= lstart - lposition - 2; i++)
AddFrame((int)(floor(currenttime+(i*1000) / AverageFrameRate)));