summaryrefslogtreecommitdiff
path: root/dvbspu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-12 11:52:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-12 11:52:53 +0100
commit0e22c9ff9e45686d1488d96903d5404d8143afa1 (patch)
tree77ee2c814a2a2d32cf4b584f31f9f161442611ee /dvbspu.c
parent23d7402c006e58ee1bf1895db2f317f60f1b5b94 (diff)
downloadvdr-0e22c9ff9e45686d1488d96903d5404d8143afa1.tar.gz
vdr-0e22c9ff9e45686d1488d96903d5404d8143afa1.tar.bz2
Improved OSD area handling in cDvbSpuDecoder
Diffstat (limited to 'dvbspu.c')
-rw-r--r--dvbspu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dvbspu.c b/dvbspu.c
index 745af8b2..9dbe07a8 100644
--- a/dvbspu.c
+++ b/dvbspu.c
@@ -8,7 +8,7 @@
*
* parts of this file are derived from the OMS program.
*
- * $Id: dvbspu.c 1.19 2006/01/08 11:39:46 kls Exp $
+ * $Id: dvbspu.c 1.20 2006/02/12 11:50:20 kls Exp $
*/
#include "dvbspu.h"
@@ -368,11 +368,11 @@ void cDvbSpuDecoder::Draw(void)
if (bg || fg) {
if (osd == NULL) {
osd = cOsdProvider::NewOsd(0, 0);
- int x2 = areaSize.x2;
- while ((x2 - areaSize.x1 + 1) & 0x03)
- x2++;
- tArea Area = { areaSize.x1, areaSize.y1, x2, areaSize.y2, (fg && bg) ? 4 : 2 };
- osd->SetAreas(&Area, 1);
+ if ((areaSize.width() & 3) != 0)
+ areaSize.x2 += 4 - (areaSize.width() & 3);
+ tArea Area = { areaSize.x1, areaSize.y1, areaSize.x2, areaSize.y2, (fg && bg) ? 4 : 2 };
+ if (osd->SetAreas(&Area, 1) != oeOk)
+ dsyslog("dvbspu: AreaSize (%d, %d) (%d, %d) Bpp %d", areaSize.x1, areaSize.y1, areaSize.x2, areaSize.y2, (fg && bg) ? 4 : 2 );
}
if (bg)