diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-24 11:27:04 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-02-24 11:27:04 +0100 |
commit | 02061575588015c142dcd2eebfb9963ae8eb8a99 (patch) | |
tree | ee36237c656d9b4e1e504d3ffea4212c865d177b /dvbsubtitle.c | |
parent | 1b104953ae203da6090102cea16d7688f6e6f8de (diff) | |
download | vdr-02061575588015c142dcd2eebfb9963ae8eb8a99.tar.gz vdr-02061575588015c142dcd2eebfb9963ae8eb8a99.tar.bz2 |
Fixed getting the video aspect ratio for scaling subtitles
Diffstat (limited to 'dvbsubtitle.c')
-rw-r--r-- | dvbsubtitle.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dvbsubtitle.c b/dvbsubtitle.c index bb30cb90..c29c9155 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.24 2012/02/23 09:20:36 kls Exp $ + * $Id: dvbsubtitle.c 2.25 2012/02/24 11:19:54 kls Exp $ */ @@ -797,7 +797,6 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void) displayHeight = windowHeight = 576; windowHorizontalOffset = 0; windowVerticalOffset = 0; - SetOsdData(); pages = new cList<cDvbSubtitlePage>; bitmaps = new cList<cDvbSubtitleBitmaps>; Start(); @@ -831,7 +830,6 @@ void cDvbSubtitleConverter::Reset(void) displayHeight = windowHeight = 576; windowHorizontalOffset = 0; windowVerticalOffset = 0; - SetOsdData(); Unlock(); } @@ -1001,7 +999,11 @@ void cDvbSubtitleConverter::SetOsdData(void) bool cDvbSubtitleConverter::AssertOsd(void) { LOCK_THREAD; - return osd || (osd = cOsdProvider::NewOsd(int(round(osdFactorX * windowHorizontalOffset + osdDeltaX)), int(round(osdFactorY * windowVerticalOffset + osdDeltaY)) + Setup.SubtitleOffset, OSD_LEVEL_SUBTITLES)); + if (!osd) { + SetOsdData(); + osd = cOsdProvider::NewOsd(int(round(osdFactorX * windowHorizontalOffset + osdDeltaX)), int(round(osdFactorY * windowVerticalOffset + osdDeltaY)) + Setup.SubtitleOffset, OSD_LEVEL_SUBTITLES); + } + return osd != NULL; } int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t Pts) |