Skip to content

Commit

Permalink
Fix for SSA/ASS repositioning becoming permanently disabled after typ…
Browse files Browse the repository at this point in the history
…esetting was displayed
  • Loading branch information
Cyberbeing committed Oct 7, 2018
1 parent 4804cf2 commit 7cdd471
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/filters/transform/vsfilter/xy_sub_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CRenderedTextSubtitle*>(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<CRenderedTextSubtitle*>(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);
Expand Down
6 changes: 4 additions & 2 deletions src/subtitles/RTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7cdd471

Please sign in to comment.