From 92599dbf7638540b9ed9ff3dbd6f2625c1c3f45f Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Mon, 14 Feb 2011 11:50:09 +0100 Subject: Improved stop detection H262 fps detection bugfix --- command/marks.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'command/marks.cpp') diff --git a/command/marks.cpp b/command/marks.cpp index 8442872..8909e3c 100644 --- a/command/marks.cpp +++ b/command/marks.cpp @@ -186,14 +186,18 @@ clMark *clMarks::Get(int Position) return mark; } -clMark *clMarks::GetAround(int Position, int Type, int Mask) +clMark *clMarks::GetAround(int Frames, int Position, int Type, int Mask) { clMark *m1=GetPrev(Position,Type,Mask); clMark *m2=GetNext(Position,Type,Mask); if (!m1 && !m2) return NULL; if (!m1 && m2) return m2; - if (m1 && !m2) return m1; + if (m1 && !m2) + { + if (abs(Position-m1->position)>Frames) return NULL; + return m1; + } if (abs(m1->position-Position)>abs(m2->position-Position)) { -- cgit v1.2.3