libdvbsub: allow FullHD resolution dimensions

Origin commit data
------------------
Branch: ni/coolstream
Commit: 31918aefff
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-16 (Fri, 16 Jun 2017)

Origin message was:
------------------
- libdvbsub: allow FullHD resolution dimensions

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-06-16 11:40:17 +02:00
parent afc4d55652
commit f3aff51dc1

View File

@@ -164,7 +164,12 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
yoff = ystart;
}
#endif
int h2 = (width == 1280) ? 720 : 576;
int h2 = 576;
switch (width)
{
case 1280: h2 = 720; break;
case 1920: h2 = 1080; break;
}
xoff = sub.rects[i]->x * sw / width;
yoff = sub.rects[i]->y * sh / h2;
int nw = width * sw / width;