mirror of https://github.com/odrling/Aegisub
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.
This commit is contained in:
parent
3518f381a7
commit
4cf49cf9fb
|
@ -2283,6 +2283,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d
|
||||||
if(t1 <= 0 && t2 <= 0) {t1 = 0; t2 = m_delay;}
|
if(t1 <= 0 && t2 <= 0) {t1 = 0; t2 = m_delay;}
|
||||||
|
|
||||||
if(m_time <= t1) p = p1;
|
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)
|
else if(t1 < m_time && m_time < t2)
|
||||||
{
|
{
|
||||||
double t = 1.0*(m_time-t1)/(t2-t1);
|
double t = 1.0*(m_time-t1)/(t2-t1);
|
||||||
|
|
Loading…
Reference in New Issue