From 718cfb17f17bde5802ff6cb5fbcd706b7afc14ab Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 24 Feb 2006 23:26:24 +0000 Subject: [PATCH] YET ANOTHER VFR UPDATE! Originally committed to SVN as r160. --- core/vfr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/vfr.cpp b/core/vfr.cpp index c7edf11c9..7a332d1a4 100644 --- a/core/vfr.cpp +++ b/core/vfr.cpp @@ -317,7 +317,10 @@ int FrameRate::PFrameAtTime(int ms,bool useceil) { // If it is, is the previous smaller? // 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 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; } else { - if (FrameRateType == VFR) finalTime = PTimeAtFrame(frame); - else finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2; + //if (FrameRateType == VFR) finalTime = PTimeAtFrame(frame); + //else finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2; + finalTime = (PTimeAtFrame(frame) + PTimeAtFrame(frame+1))/2; } }