summaryrefslogtreecommitdiff
path: root/dvbsubtitle.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-11-04 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-11-04 18:00:00 +0100
commit182cd78af06cee95594307b792b8951153c4888e (patch)
tree4b628340a8e403307a076f35a0e1fcf405762ba6 /dvbsubtitle.c
parentdbf38b7c68911187b6a48688b738c31612d35984 (diff)
downloadvdr-patch-lnbsharing-182cd78af06cee95594307b792b8951153c4888e.tar.gz
vdr-patch-lnbsharing-182cd78af06cee95594307b792b8951153c4888e.tar.bz2
Version 1.5.11vdr-1.5.11
- Fixed checking compatibility mode for old subtitles plugin (thanks to Marco Schlüßler). - Updated the French OSD texts (thanks to Michael Nival). - Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Updated the Italian OSD texts (thanks to Diego Pierotto). - The "Play" key now starts replay of the selected recording in the Recordings menu (thanks to Ville Skyttä); - Improved shutdown handling (thanks to Udo Richter). - Housekeeping now waits for a while after a replay has ended (thanks to Udo Richter). - Added more special characters to the list of allowed characters when entering strings (thanks to Thomas Günther). - Added Ukrainian language texts (thanks to Yarema Aka Knedlyk). - Added a workaround for recovering from wrongfully interpreted "pre 1.3.19 PS1 packets". - Fixed a possible blocking in replay when subtitles are active. - Fixed displaying subtitles in live mode. - Fixed handling CONFDIR (thanks to Rolf Ahrenberg). - Added some missing 'const' keywords (thanks to Sascha Volkenandt). - The 'Allowed' parameter in cMenuEditStrItem() is now NULL by default, which results in using tr(FileNameChars) (suggested by Thomas Günther). - Added a missing '.' to the date returned by DayDateTime() (thanks to Lauri Nurmi). - Improved the 'i18n' target in the Makefile to avoid unnecessary work (thanks to Stefan Huelswitt). The 'newplugin' and 'i18n-to-gettext.pl' scripts have been changed accordingly. Plugin authors may want to adjust the 'i18n' target of their Makefiles. - Fixed a crash if no fonts are found (thanks to Mario Ivankovits and Clemens Kirchgatterer). - Fixed decoding filename characters in case there are not two hex digits after the '#' (reported by Helmut Auer).
Diffstat (limited to 'dvbsubtitle.c')
-rw-r--r--dvbsubtitle.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/dvbsubtitle.c b/dvbsubtitle.c
index 1f7e6b7..e845594 100644
--- a/dvbsubtitle.c
+++ b/dvbsubtitle.c
@@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
- * $Id: dvbsubtitle.c 1.1 2007/10/14 14:02:35 kls Exp $
+ * $Id: dvbsubtitle.c 1.2 2007/11/03 14:36:07 kls Exp $
*/
#include "dvbsubtitle.h"
@@ -692,7 +692,7 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, int Length)
bool ResetSubtitleAssembler = Data[PayloadOffset + 3] == 0x00;
// Compatibility mode for old subtitles plugin:
- if ((Data[PayloadOffset - 3] & 0x81) == 1 && Data[PayloadOffset - 2] == 0x81) {
+ if ((Data[7] & 0x01) && (Data[PayloadOffset - 3] & 0x81) == 0x01 && Data[PayloadOffset - 2] == 0x81) {
PayloadOffset--;
SubstreamHeaderLength = 1;
ResetSubtitleAssembler = Data[8] >= 5;
@@ -730,8 +730,8 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, int Length)
break;
}
}
- return Length;
}
+ return Length;
}
return 0;
}
@@ -767,7 +767,7 @@ void cDvbSubtitleConverter::Action(void)
//TODO sync on PTS? are there actually devices that don't deliver an STC?
}
Delta /= 90; // STC and PTS are in 1/90000s
- if (abs(Delta) <= MAXDELTA) {
+ if (Delta <= MAXDELTA) {
if (Delta <= 0) {
dbgconverter("Got %d bitmaps, showing #%d\n", bitmaps->Count(), sb->Index() + 1);
if (AssertOsd()) {
@@ -777,8 +777,8 @@ void cDvbSubtitleConverter::Action(void)
}
bitmaps->Del(sb);
}
- else
- WaitMs = min(max(Delta, int64_t(0)), int64_t(1000));
+ else if (Delta < WaitMs)
+ WaitMs = Delta;
}
else
bitmaps->Del(sb);
@@ -830,6 +830,8 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
pages->Add(page);
dbgpages("Create SubtitlePage %d (total pages = %d)\n", pageId, pages->Count());
}
+ if (Pts)
+ page->SetPts(Pts);
switch (segmentType) {
case PAGE_COMPOSITION_SEGMENT: {
dbgsegments("PAGE_COMPOSITION_SEGMENT\n");
@@ -837,8 +839,6 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
if (pageVersion == page->Version())
break; // no update
page->SetVersion(pageVersion);
- if (Pts)
- page->SetPts(Pts);
page->SetTimeout(Data[6]);
page->SetState((Data[6 + 1] & 0x0C) >> 2);
page->regions.Clear();
@@ -968,6 +968,7 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
dbgsegments("END_OF_DISPLAY_SET_SEGMENT\n");
FinishPage(page);
}
+ break;
default:
dbgsegments("*** unknown segment type: %02X\n", segmentType);
}