summaryrefslogtreecommitdiff
path: root/dvbspu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-05-08 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-05-08 18:00:00 +0200
commitc23522ade253e23b5bf6141d7d7e7335d6abcd1d (patch)
tree283ea2d0dd325e6614ea031f3fcdcd9534a103ee /dvbspu.c
parent782b517c51eaa6d2641fe9b6801afdad50be8586 (diff)
downloadvdr-patch-lnbsharing-c23522ade253e23b5bf6141d7d7e7335d6abcd1d.tar.gz
vdr-patch-lnbsharing-c23522ade253e23b5bf6141d7d7e7335d6abcd1d.tar.bz2
Version 1.3.24vdr-1.3.24
- Now including the optional user defined Make.config from the 'libsi' Makefile (thanks to Ville Skyttä). - Updated the Danish OSD texts (thanks to Mogens Elneff). - Fixed a memory leak in tComponent (thanks to Stefan Huelswitt and Daniel Thompson). - Fixed a memory leak in cDvbPlayer (thanks to Stefan Huelswitt). - Added missing text internationalization for "Starting EPG scan" (thanks to Matthias Lötzke). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed handling transparent areas in cDvbSpuBitmap (thanks to Marco Schlüßler). - Now also considering the "EPG linger time" when saving the EPG data to file or listing it via LSTE (thanks to Roman Krenický). - Fixed handling fragments of less than 4 byte in cPesAssembler (thanks to Reinhard Nissl). - Fixed a bug in libsi's SubtitlingDescriptor::getLength() (thanks to Marco Schlüßler). - When reading the channels.conf file, duplicate channels (i.e. ones that have the same channel ID) are now automatically deleted and only the first one is actually stored. - Fixed handling lifetime when deciding whether to delete a recording (thanks to Udo Richter). - Fixed timeout handling in cRwLock::Lock() (thanks to Sascha Volkenandt for reporting this one). - Since there are several places in thread.c where a timeout value is calculated, this has been put into a separate function. - The timer status now has a new bit that is set when that timer is currently recording (suggested by Matthias Schniedermeyer). See man vdr(5) for details. - Removed scaling coordinates in letterbox mode from cDvbSpu - the DVD plugin, which was the only one needing this, doesn't need it any more (thanks to Marco Schlüßler). - No longer retuning or restarting a recording if only the language code of an audio or Dolby PID changes. - Now preferring budget cards when selecting a DVB device for recording. - Recordings now avoid zero sized video data files (thanks to Wolfgang Fitz). - Some rearrangements in cDvbPlayer::Action() to avoid lockups on NPTL systems (thanks to Reinhard Nissl). - Fixed a wrong inheritance in libsi's SubtitlingDescriptor::Subtitling (thanks to Marco Schlüßler).
Diffstat (limited to 'dvbspu.c')
-rw-r--r--dvbspu.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/dvbspu.c b/dvbspu.c
index 3ca780a..9c8da3b 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.12 2005/02/06 09:54:51 kls Exp $
+ * $Id: dvbspu.c 1.14 2005/05/07 11:13:48 kls Exp $
*/
#include <assert.h>
@@ -143,6 +143,8 @@ bool cDvbSpuBitmap::getMinSize(const aDvbSpuPalDescr paldescr,
if (ret)
DEBUG("MinSize: (%d, %d) x (%d, %d)\n",
size.x1, size.y1, size.x2, size.y2);
+ if (size.x1 > size.x2 || size.y1 > size.y2)
+ return false;
return ret;
}
@@ -304,24 +306,6 @@ void cDvbSpuDecoder::clearHighlight(void)
hlpsize.y2 = -1;
}
-int cDvbSpuDecoder::ScaleYcoord(int value)
-{
- if (scaleMode == eSpuLetterBox) {
- int offset = cDevice::PrimaryDevice()->GetVideoSystem() == vsPAL ? 72 : 60;
- return lround((value * 3.0) / 4.0) + offset;
- }
- else
- return value;
-}
-
-int cDvbSpuDecoder::ScaleYres(int value)
-{
- if (scaleMode == eSpuLetterBox)
- return lround((value * 3.0) / 4.0);
- else
- return value;
-}
-
sDvbSpuRect cDvbSpuDecoder::CalcAreaSize(sDvbSpuRect fgsize, cBitmap *fgbmp, sDvbSpuRect bgsize, cBitmap *bgbmp)
{
sDvbSpuRect size;
@@ -365,22 +349,15 @@ void cDvbSpuDecoder::Draw(void)
sDvbSpuRect hlsize;
hlsize.x1 = hlpsize.x1;
- hlsize.y1 = ScaleYcoord(hlpsize.y1);
+ hlsize.y1 = hlpsize.y1;
hlsize.x2 = hlpsize.x2;
- hlsize.y2 = ScaleYcoord(hlpsize.y2);
+ hlsize.y2 = hlpsize.y2;
if (highlight)
fg = spubmp->getBitmap(hlpDescr, palette, hlsize);
- if (spubmp->getMinSize(palDescr, bgsize)) {
+ if (spubmp->getMinSize(palDescr, bgsize))
bg = spubmp->getBitmap(palDescr, palette, bgsize);
- if (scaleMode == eSpuLetterBox) {
- // the coordinates have to be modified for letterbox
- int y1 = ScaleYres(bgsize.y1) + bgsize.height();
- bgsize.y2 = y1 + bgsize.height();
- bgsize.y1 = y1;
- }
- }
sDvbSpuRect areaSize = CalcAreaSize(hlsize, fg, bgsize, bg);