Skip to content

Commit

Permalink
RTS: ease on a debug assert
Browse files Browse the repository at this point in the history
  • Loading branch information
pinterf committed Mar 6, 2021
1 parent f71eb96 commit 369c822
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/subtitles/RTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3500,7 +3500,11 @@ void CRenderedTextSubtitle::RenderOneSubtitle( const SIZECoor2& output_size,
case 1: margin.y = video_org.y; break; //do not move so that it aligns with the middle of the video
case 2: margin.y = video_org.y + margin_rect.bottom; break;//move to bottom
}
ASSERT(clipRect.Width()*MAX_SUB_PIXEL==output_size.cx && clipRect.Height()*MAX_SUB_PIXEL==output_size.cy);
ASSERT(clipRect.Width() * MAX_SUB_PIXEL == output_size.cx &&
( (clipRect.Height() * MAX_SUB_PIXEL == output_size.cy) ||
((clipRect.Height() + 1) & ~1) * MAX_SUB_PIXEL == (output_size.cy + 1) & ~1
));
// Do not assert when height is e.g. 413*8 instead of 414*8. YV12 SubSampling? FIXME to check
clipRect.SetRect(0,0,
(output_size.cx + video_org.x+margin_rect.left+margin_rect.right)>>3,
(output_size.cy + video_org.y+margin_rect.top +margin_rect.bottom)>>3);
Expand Down

0 comments on commit 369c822

Please sign in to comment.