Fixed handling subtitle color palettes on channels where subtitles appear "word by word"

This commit is contained in:
Klaus Schmidinger 2012-02-22 11:25:57 +01:00
parent 7519c21a51
commit a949b9c7d2
3 changed files with 13 additions and 6 deletions

View File

@ -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

View File

@ -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).

View File

@ -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) {