1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed getting the video aspect ratio for scaling subtitles

This commit is contained in:
Klaus Schmidinger 2012-02-24 11:27:04 +01:00
parent 1b104953ae
commit 0206157558
2 changed files with 8 additions and 5 deletions

View File

@ -6889,7 +6889,7 @@ Video Disk Recorder Revision History
- Fixed switching into time shift mode when pausing live video (thanks to Reinhard - Fixed switching into time shift mode when pausing live video (thanks to Reinhard
Nissl for helping to debug this one). Nissl for helping to debug this one).
2012-02-22: Version 1.7.25 2012-02-24: Version 1.7.25
- The fps value for channels where it differs from the default is now set correctly - The fps value for channels where it differs from the default is now set correctly
when pausing live video. when pausing live video.
@ -6908,3 +6908,4 @@ Video Disk Recorder Revision History
"word by word" (thanks to Rolf Ahrenberg). "word by word" (thanks to Rolf Ahrenberg).
- Fixed upscaling cBitmaps with anti-aliasing (thanks to Rolf Ahrenberg for reporting - Fixed upscaling cBitmaps with anti-aliasing (thanks to Rolf Ahrenberg for reporting
a problem with color palettes in subtitles). a problem with color palettes in subtitles).
- Fixed getting the video aspect ratio for scaling subtitles.

View File

@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de> * Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * 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; displayHeight = windowHeight = 576;
windowHorizontalOffset = 0; windowHorizontalOffset = 0;
windowVerticalOffset = 0; windowVerticalOffset = 0;
SetOsdData();
pages = new cList<cDvbSubtitlePage>; pages = new cList<cDvbSubtitlePage>;
bitmaps = new cList<cDvbSubtitleBitmaps>; bitmaps = new cList<cDvbSubtitleBitmaps>;
Start(); Start();
@ -831,7 +830,6 @@ void cDvbSubtitleConverter::Reset(void)
displayHeight = windowHeight = 576; displayHeight = windowHeight = 576;
windowHorizontalOffset = 0; windowHorizontalOffset = 0;
windowVerticalOffset = 0; windowVerticalOffset = 0;
SetOsdData();
Unlock(); Unlock();
} }
@ -1001,7 +999,11 @@ void cDvbSubtitleConverter::SetOsdData(void)
bool cDvbSubtitleConverter::AssertOsd(void) bool cDvbSubtitleConverter::AssertOsd(void)
{ {
LOCK_THREAD; 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) int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t Pts)