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

Some fixes to dvbspu.[hc]

This commit is contained in:
Klaus Schmidinger 2009-12-13 12:16:44 +01:00
parent a648187de4
commit 140ed23e7e
4 changed files with 9 additions and 4 deletions

View File

@ -2477,6 +2477,7 @@ Johann Friedrichs <johann.friedrichs@web.de>
-D_LARGEFILE64_SOURCE" should be added to Make.config. -D_LARGEFILE64_SOURCE" should be added to Make.config.
for adding stream type 11172 AUDIO to cPatPmtParser::ParsePmt() for adding stream type 11172 AUDIO to cPatPmtParser::ParsePmt()
for removing the workaround for short channel names of "Kabel Deutschland" for removing the workaround for short channel names of "Kabel Deutschland"
for some fixes to dvbspu.[hc]
Timo Helkio <timolavi@mbnet.fi> Timo Helkio <timolavi@mbnet.fi>
for reporting a hangup when replaying a TS recording with subtitles activated for reporting a hangup when replaying a TS recording with subtitles activated

View File

@ -6217,3 +6217,4 @@ Video Disk Recorder Revision History
- Removed the workaround for short channel names of "Kabel Deutschland", because - Removed the workaround for short channel names of "Kabel Deutschland", because
apparently they now have their data according to the DVB standard (thanks to apparently they now have their data according to the DVB standard (thanks to
Johann Friedrichs). Johann Friedrichs).
- Some fixes to dvbspu.[hc] (thanks to Johann Friedrichs).

View File

@ -8,7 +8,7 @@
* *
* parts of this file are derived from the OMS program. * parts of this file are derived from the OMS program.
* *
* $Id: dvbspu.c 2.4 2009/12/05 16:06:12 kls Exp $ * $Id: dvbspu.c 2.5 2009/12/13 12:10:03 kls Exp $
*/ */
#include "dvbspu.h" #include "dvbspu.h"
@ -348,7 +348,7 @@ int cDvbSpuBitmap::getMinBpp(const aDvbSpuPalDescr paldescr)
col++; col++;
} }
} }
return col > 2 ? 2 : 1; return col > 2 ? 4 : 1;
} }
int cDvbSpuDecoder::CalcAreaBpp(cBitmap *fgbmp, cBitmap *bgbmp) int cDvbSpuDecoder::CalcAreaBpp(cBitmap *fgbmp, cBitmap *bgbmp)
@ -386,6 +386,9 @@ void cDvbSpuDecoder::Draw(void)
if (spubmp->getMinSize(palDescr, bgsize)) if (spubmp->getMinSize(palDescr, bgsize))
bg = spubmp->getBitmap(palDescr, palette, bgsize); bg = spubmp->getBitmap(palDescr, palette, bgsize);
if (!fg || !bg || !osd)
Hide();
if (osd == NULL) { if (osd == NULL) {
restricted_osd = false; restricted_osd = false;
osd = cOsdProvider::NewOsd(0, 0); osd = cOsdProvider::NewOsd(0, 0);

View File

@ -8,7 +8,7 @@
* *
* parts of this file are derived from the OMS program. * parts of this file are derived from the OMS program.
* *
* $Id: dvbspu.h 2.3 2009/12/05 15:17:08 kls Exp $ * $Id: dvbspu.h 2.4 2009/12/13 12:07:00 kls Exp $
*/ */
#ifndef __DVBSPU_H #ifndef __DVBSPU_H
@ -197,7 +197,7 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const
{ {
return palette[idx] | (trans == 0x0f) ? 0xff000000 : (trans << 28); return palette[idx] | ((trans == 0x0f) ? 0xff000000 : (trans << 28));
} }
#endif // __DVBSPU_H #endif // __DVBSPU_H