diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2015-03-25 12:39:01 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2015-03-25 12:39:01 +0100 |
commit | 577d43facf1f1049e5b3ee83fcdea41f61004a6d (patch) | |
tree | 2eaccc15d2cd30791d3f6d3ee95647a29416cbfa /dvbsubtitle.c | |
parent | 909e6c6249939e61e27a039b04da5ea296191cbe (diff) | |
download | vdr-577d43facf1f1049e5b3ee83fcdea41f61004a6d.tar.gz vdr-577d43facf1f1049e5b3ee83fcdea41f61004a6d.tar.bz2 |
Fixed scaling subtitles (their areas could sometimes extend outside the actual OSD)
Diffstat (limited to 'dvbsubtitle.c')
-rw-r--r-- | dvbsubtitle.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dvbsubtitle.c b/dvbsubtitle.c index d5ae60b0..fff3f8b8 100644 --- a/dvbsubtitle.c +++ b/dvbsubtitle.c @@ -7,7 +7,7 @@ * Original author: Marco Schluessler <marco@lordzodiac.de> * With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * - * $Id: dvbsubtitle.c 3.10 2015/01/20 14:53:57 kls Exp $ + * $Id: dvbsubtitle.c 4.1 2015/03/25 12:37:08 kls Exp $ */ #include "dvbsubtitle.h" @@ -1516,8 +1516,7 @@ void cDvbSubtitleConverter::SetOsdData(void) osdDeltaX = osdDeltaY = 0; } else { - osdFactorX = VideoAspect * OsdHeight / displayWidth; - osdFactorY = double(OsdHeight) / displayHeight; + osdFactorX = osdFactorY = min(double(OsdWidth) / displayWidth, double(OsdHeight) / displayHeight); osdDeltaX = (OsdWidth - displayWidth * osdFactorX) / 2; osdDeltaY = (OsdHeight - displayHeight * osdFactorY) / 2; } |