summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-22 11:25:57 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-22 11:25:57 +0100
commita949b9c7d2bc14d2f6322764c88f4d11261680f1 (patch)
tree6901a8cddd41573d3797b6bb5c58b32231256ed8
parent7519c21a5184d36a264b71618e2513f5d1b0f0bc (diff)
downloadvdr-a949b9c7d2bc14d2f6322764c88f4d11261680f1.tar.gz
vdr-a949b9c7d2bc14d2f6322764c88f4d11261680f1.tar.bz2
Fixed handling subtitle color palettes on channels where subtitles appear "word by word"
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--dvbsubtitle.c13
3 files changed, 13 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index e6739dee..b132516b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1131,6 +1131,8 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for adding support for handling DVB-T2 transponders
for suggesting to add member functions Adapter() and Frontend() to cDvbDevice
for improving handling subtitles of BBC channels
+ for fixing handling subtitle color palettes on channels where subtitles appear
+ "word by word"
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
diff --git a/HISTORY b/HISTORY
index 25e3259f..a9044cdc 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6889,7 +6889,7 @@ Video Disk Recorder Revision History
- Fixed switching into time shift mode when pausing live video (thanks to Reinhard
Nissl for helping to debug this one).
-2012-02-21: Version 1.7.25
+2012-02-22: Version 1.7.25
- The fps value for channels where it differs from the default is now set correctly
when pausing live video.
@@ -6904,3 +6904,5 @@ Video Disk Recorder Revision History
device.
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
+- Fixed handling subtitle color palettes on channels where subtitles appear
+ "word by word" (thanks to Rolf Ahrenberg).
diff --git a/dvbsubtitle.c b/dvbsubtitle.c
index aa17a7af..7b8301d4 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.22 2012/02/13 09:48:18 kls Exp $
+ * $Id: dvbsubtitle.c 2.23 2012/02/22 09:33:45 kls Exp $
*/
@@ -1035,7 +1035,7 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
if (!page) {
page = new cDvbSubtitlePage(pageId);
pages->Add(page);
- dbgpages("Create SubtitlePage %d (total pages = %d)\n", pageId, pages->Count());
+ dbgpages("Create SubtitlePage %d (total pages = %d)\n", pageId, pages->Count());
}
if (Pts)
page->SetPts(Pts);
@@ -1112,7 +1112,7 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
}
case CLUT_DEFINITION_SEGMENT: {
dbgsegments("CLUT_DEFINITION_SEGMENT\n");
- cSubtitleClut *clut = page->GetClutById(bs.GetBits(8), true);
+ cSubtitleClut *clut = page->GetClutById(bs.GetBits(8), true);
int clutVersion = bs.GetBits(4);
if (clutVersion == clut->Version())
break; // no update
@@ -1155,7 +1155,6 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
clut->SetColor(8, clutEntryId, value);
}
dbgcluts("\n");
- page->UpdateRegionPalette(clut);
break;
}
case OBJECT_DATA_SEGMENT: {
@@ -1310,7 +1309,11 @@ void cDvbSubtitleConverter::FinishPage(cDvbSubtitlePage *Page)
cDvbSubtitleBitmaps *Bitmaps = new cDvbSubtitleBitmaps(Page->Pts(), Page->Timeout(), Areas, NumAreas, osdFactorX, osdFactorY);
bitmaps->Add(Bitmaps);
for (cSubtitleRegion *sr = Page->regions.First(); sr; sr = Page->regions.Next(sr)) {
- sr->UpdateTextData(Page->GetClutById(sr->ClutId()));
+ cSubtitleClut *clut = Page->GetClutById(sr->ClutId());
+ if (!clut)
+ continue;
+ sr->Replace(*clut->GetPalette(sr->Bpp()));
+ sr->UpdateTextData(clut);
int posX = sr->HorizontalAddress();
int posY = sr->VerticalAddress();
if (sr->Width() > 0 && sr->Height() > 0) {