From 4cf49cf9fbd0fc98daaf98662d4420fc8fe017cd Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 26 Aug 2007 15:44:15 +0000 Subject: [PATCH] Possibly fix a rounding problem that causes subtitles with \pos to move a slightly bit around even though they shouldn't. Originally committed to SVN as r1536. --- vsfilter/subtitles/RTS.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vsfilter/subtitles/RTS.cpp b/vsfilter/subtitles/RTS.cpp index 96a77c6c0..5c5e8db58 100644 --- a/vsfilter/subtitles/RTS.cpp +++ b/vsfilter/subtitles/RTS.cpp @@ -2283,6 +2283,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d if(t1 <= 0 && t2 <= 0) {t1 = 0; t2 = m_delay;} if(m_time <= t1) p = p1; + else if (p1 == p2) p = p1; // jfs: avoid rounding error problems sometimes causing subtitles with \pos to jump around a bit else if(t1 < m_time && m_time < t2) { double t = 1.0*(m_time-t1)/(t2-t1);