From 369c822a4ee5bcfd225640e00d98720f480402ad Mon Sep 17 00:00:00 2001 From: Pinterf Date: Sat, 6 Mar 2021 15:43:59 +0100 Subject: [PATCH] RTS: ease on a debug assert --- src/subtitles/RTS.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/subtitles/RTS.cpp b/src/subtitles/RTS.cpp index d1ab6f08..2bd4a090 100644 --- a/src/subtitles/RTS.cpp +++ b/src/subtitles/RTS.cpp @@ -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);