YET ANOTHER VFR UPDATE!

Originally committed to SVN as r160.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-24 23:26:24 +00:00
parent b31d2ae85e
commit 718cfb17f1
1 changed files with 7 additions and 3 deletions

View File

@ -317,7 +317,10 @@ int FrameRate::PFrameAtTime(int ms,bool useceil) {
// If it is, is the previous smaller? // If it is, is the previous smaller?
// If so, this is the frame we're looking for // If so, this is the frame we're looking for
if (largerEqual && (cur == 0 || Frame[cur-1] < ms)) return cur; if (largerEqual && (cur == 0 || Frame[cur-1] < ms)) {
if (useceil) return cur;
return cur-1;
}
// Not found, continue search // Not found, continue search
if (largerEqual) end = cur-1; if (largerEqual) end = cur-1;
@ -388,8 +391,9 @@ int FrameRate::GetTimeAtFrame(int frame,bool start,bool exact) {
finalTime = (PTimeAtFrame(frame-1) + PTimeAtFrame(frame))/2; finalTime = (PTimeAtFrame(frame-1) + PTimeAtFrame(frame))/2;
} }
else { else {
if (FrameRateType == VFR) finalTime = PTimeAtFrame(frame); //if (FrameRateType == VFR) finalTime = PTimeAtFrame(frame);
else finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2; //else finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2;
finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2;
} }
} }