From 7cdd47174548c784d083468be99c62b085b75a61 Mon Sep 17 00:00:00 2001 From: Cyberbeing Date: Sun, 7 Oct 2018 10:18:17 -0700 Subject: [PATCH] Fix for SSA/ASS repositioning becoming permanently disabled after typesetting was displayed --- src/filters/transform/vsfilter/xy_sub_filter.cpp | 10 ++++------ src/subtitles/RTS.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/filters/transform/vsfilter/xy_sub_filter.cpp b/src/filters/transform/vsfilter/xy_sub_filter.cpp index e3232e545..ad26caeff 100644 --- a/src/filters/transform/vsfilter/xy_sub_filter.cpp +++ b/src/filters/transform/vsfilter/xy_sub_filter.cpp @@ -1242,12 +1242,10 @@ STDMETHODIMP XySubFilter::RequestFrame( REFERENCE_TIME start, REFERENCE_TIME sto //fix me: ASSERT(0); } - if (m_xy_bool_opt[BOOL_IS_MOVABLE]) - { - CRenderedTextSubtitle * rts = dynamic_cast(m_curSubStream); - if ((rts) && ((!rts->IsMovable()) || ((!rts->IsSimple()) && (!m_xy_bool_opt[BOOL_ALLOW_MOVING])))) - m_xy_bool_opt[BOOL_IS_MOVABLE] = false; - } + + CRenderedTextSubtitle * rts = dynamic_cast(m_curSubStream); + m_xy_bool_opt[BOOL_IS_MOVABLE] = (!rts) || ((rts->IsMovable()) && ((rts->IsSimple()) || (m_xy_bool_opt[BOOL_ALLOW_MOVING]))); + } } CAutoLock cAutoLock(&m_csConsumer); diff --git a/src/subtitles/RTS.cpp b/src/subtitles/RTS.cpp index 48d5373b8..5686d0752 100644 --- a/src/subtitles/RTS.cpp +++ b/src/subtitles/RTS.cpp @@ -3375,18 +3375,20 @@ STDMETHODIMP CRenderedTextSubtitle::RenderEx( IXySubRenderFrame**subRenderFrame, return hr; } - if ((m_movable) && (!m_simple)) + if (!m_simple) { + bool newMovable = true; POSITION pos=sub2List.GetHeadPosition(); while ( pos!=NULL ) { const CSubtitle2& sub2 = sub2List.GetNext(pos); if (sub2.s->m_hard_position_level > POS_LVL_NONE) { - m_movable = false; + newMovable = false; break; } } + m_movable = newMovable; } TRACE_RENDERER_REQUEST("Begin build draw item tree");