diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-16 12:01:31 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-16 12:01:31 +0100 |
commit | 6504e55b76fe8118c6309131a423c143c818c372 (patch) | |
tree | e9d1347c9002cf6d9f548282b184299e6df3399f /dvbsubtitle.c | |
parent | c8b0ee3289849ab0d5778c58d65771f5c0270314 (diff) | |
download | vdr-6504e55b76fe8118c6309131a423c143c818c372.tar.gz vdr-6504e55b76fe8118c6309131a423c143c818c372.tar.bz2 |
Fixed reduced bpp support for DVB subtitles
Diffstat (limited to 'dvbsubtitle.c')
-rw-r--r-- | dvbsubtitle.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/dvbsubtitle.c b/dvbsubtitle.c index ca3a6929..ab755c4b 100644 --- a/dvbsubtitle.c +++ b/dvbsubtitle.c @@ -7,7 +7,7 @@ * Original author: Marco Schluessler <marco@lordzodiac.de> * With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * - * $Id: dvbsubtitle.c 2.30 2012/03/13 15:37:03 kls Exp $ + * $Id: dvbsubtitle.c 2.31 2012/03/16 11:56:56 kls Exp $ */ @@ -1281,9 +1281,16 @@ void cDvbSubtitleConverter::FinishPage(cDvbSubtitlePage *Page) else return; // unable to draw bitmaps } - if (Reduced) { - for (int i = 0; i < NumAreas; i++) { - cSubtitleRegion *sr = Page->regions.Get(i); + cDvbSubtitleBitmaps *Bitmaps = new cDvbSubtitleBitmaps(Page->Pts(), Page->Timeout(), Areas, NumAreas, osdFactorX, osdFactorY); + bitmaps->Add(Bitmaps); + for (int i = 0; i < NumAreas; i++) { + cSubtitleRegion *sr = Page->regions.Get(i); + cSubtitleClut *clut = Page->GetClutById(sr->ClutId()); + if (!clut) + continue; + sr->Replace(*clut->GetPalette(sr->Bpp())); + sr->UpdateTextData(clut); + if (Reduced) { if (sr->Bpp() != Areas[i].bpp) { if (sr->Level() <= Areas[i].bpp) { //TODO this is untested - didn't have any such subtitle stream @@ -1299,15 +1306,6 @@ 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)) { - 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) { |