summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--dvbsubtitle.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 056e2803..6c539e09 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6580,3 +6580,5 @@ Video Disk Recorder Revision History
- Fixed the description of cReceiver in PLUGINS.html, regarding detaching a receiver
from its device before deleting it (reported by Winfried Köhler). This change in
behavior was introduced in version 1.5.7.
+- Fixed scaling subtitles in case the OSD size is exactly the same as the display
+ size of the subtitles.
diff --git a/dvbsubtitle.c b/dvbsubtitle.c
index cd296bb9..3e7c1911 100644
--- a/dvbsubtitle.c
+++ b/dvbsubtitle.c
@@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
- * $Id: dvbsubtitle.c 2.14 2011/03/27 11:52:42 kls Exp $
+ * $Id: dvbsubtitle.c 2.15 2011/03/27 13:52:58 kls Exp $
*/
#include "dvbsubtitle.h"
@@ -870,10 +870,16 @@ void cDvbSubtitleConverter::SetOsdData(void)
double VideoAspect;
cDevice::PrimaryDevice()->GetOsdSize(OsdWidth, OsdHeight, OsdAspect);
cDevice::PrimaryDevice()->GetVideoSize(VideoWidth, VideoHeight, VideoAspect);
- osdFactorX = VideoAspect * OsdHeight / displayWidth;
- osdFactorY = double(OsdHeight) / displayHeight;
- osdDeltaX = (OsdWidth - displayWidth * osdFactorX) / 2;
- osdDeltaY = (OsdHeight - displayHeight * osdFactorY) / 2;
+ if (OsdWidth == displayWidth && OsdHeight == displayHeight) {
+ osdFactorX = osdFactorY = 1.0;
+ osdDeltaX = osdDeltaY = 0;
+ }
+ else {
+ osdFactorX = VideoAspect * OsdHeight / displayWidth;
+ osdFactorY = double(OsdHeight) / displayHeight;
+ osdDeltaX = (OsdWidth - displayWidth * osdFactorX) / 2;
+ osdDeltaY = (OsdHeight - displayHeight * osdFactorY) / 2;
+ }
}
bool cDvbSubtitleConverter::AssertOsd(void)