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

Now avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there are no areas

This commit is contained in:
Klaus Schmidinger 2022-12-06 16:57:01 +01:00
parent 0bb6f87776
commit 5b176f97a4
3 changed files with 8 additions and 2 deletions

View File

@ -2207,6 +2207,8 @@ Marko M
for reporting a possible call to poll() in cSectionHandler::Action() without any for reporting a possible call to poll() in cSectionHandler::Action() without any
filters filters
for avoiding the memcpy() call in cGlyph::cGlyph() if the bitmap is empty for avoiding the memcpy() call in cGlyph::cGlyph() if the bitmap is empty
for avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there
are no areas
Patrick Rother <krd-vdr@gulu.net> Patrick Rother <krd-vdr@gulu.net>
for reporting a bug in defining timers that only differ in the day of week for reporting a bug in defining timers that only differ in the day of week

View File

@ -9828,3 +9828,5 @@ Video Disk Recorder Revision History
(reported by Marko Mäkelä). (reported by Marko Mäkelä).
- Now avoiding the memcpy() call in cGlyph::cGlyph() if the bitmap is empty (thanks - Now avoiding the memcpy() call in cGlyph::cGlyph() if the bitmap is empty (thanks
to Marko Mäkelä). to Marko Mäkelä).
- Now avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there
are no areas (thanks to Marko Mäkelä).

View File

@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de> * Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
* *
* $Id: dvbsubtitle.c 5.1 2021/03/17 15:24:34 kls Exp $ * $Id: dvbsubtitle.c 5.2 2022/12/06 16:57:01 kls Exp $
*/ */
#include "dvbsubtitle.h" #include "dvbsubtitle.h"
@ -1770,11 +1770,13 @@ void cDvbSubtitleConverter::FinishPage(cDvbSubtitlePage *Page)
return; return;
int NumAreas; int NumAreas;
tArea *Areas = Page->GetAreas(NumAreas); tArea *Areas = Page->GetAreas(NumAreas);
if (!Areas)
return;
tArea AreaCombined = Page->CombineAreas(NumAreas, Areas); tArea AreaCombined = Page->CombineAreas(NumAreas, Areas);
tArea AreaOsd = Page->ScaleArea(AreaCombined, osdFactorX, osdFactorY); tArea AreaOsd = Page->ScaleArea(AreaCombined, osdFactorX, osdFactorY);
int Bpp = 8; int Bpp = 8;
bool Reduced = false; bool Reduced = false;
if (osd && NumAreas > 0) { if (osd) {
while (osd->CanHandleAreas(&AreaOsd, 1) != oeOk) { while (osd->CanHandleAreas(&AreaOsd, 1) != oeOk) {
dbgoutput("CanHandleAreas: %d<br>\n", osd->CanHandleAreas(&AreaOsd, 1)); dbgoutput("CanHandleAreas: %d<br>\n", osd->CanHandleAreas(&AreaOsd, 1));
int HalfBpp = Bpp / 2; int HalfBpp = Bpp / 2;