diff options
-rw-r--r-- | HISTORY | 5 | ||||
-rw-r--r-- | ttxtsubsdisplayer.c | 15 | ||||
-rw-r--r-- | ttxtsubsdisplayer.h | 2 |
3 files changed, 17 insertions, 5 deletions
@@ -1,9 +1,12 @@ VDR Plugin 'ttxtsubs' Revision History -------------------------------------- -201x-xx-xx: Version x.x.x +2012-04-xx: Version x.x.x - Removed obsolete (unused since 0.2.0) setup options: DVB Source Selection, Live Delay, Record Subtitles, and Workaround for some French chns. +- Added hard-coded workaround for french channels where page numbes 850-859 + must be mapped to 880-889 (Closes #865, #703) + (Thx to Jussi Tepponen!) 2011-10-08: Version 0.2.4 - Updated patch for VDR 1.7.21 (Closes #745) diff --git a/ttxtsubsdisplayer.c b/ttxtsubsdisplayer.c index d506473..5e5bdfe 100644 --- a/ttxtsubsdisplayer.c +++ b/ttxtsubsdisplayer.c @@ -231,13 +231,22 @@ void cTtxtSubsPlayer::SearchLanguagePage(uint8_t *p, int len) } } -bool cTtxtSubsPlayer::SetPreferredPage(const char* language, bool hearingImpaired, unsigned int page) +bool cTtxtSubsPlayer::SetPreferredPage(const char* language, bool hearingImpaired, unsigned int bcdPage) { + // Some French channels still send wrong subtitle page number! + // This is a hard fix to change the page numbers 05x to 08x + // According to ETSI tables pages 850-859 are not used for + // teletext subtitles in any country, so we assume, that these can + // safely be mapped to 880-889 + + if(bcdPage >= 0x50 && bcdPage <= 0x59) + bcdPage += 0x30; + int ch = globals.langChoise(language, hearingImpaired); if (ch >= 0 && ch < mLangChoise) { mLangChoise = ch; - mDisp->SetPage(page); + mDisp->SetPage(bcdPage); mFoundLangPage = 1; - isyslog("Found subtitle page: %03x\n", page); + isyslog("Found subtitle page: %03x\n", bcdPage < 0x100 ? 0x800 + bcdPage : bcdPage); } } diff --git a/ttxtsubsdisplayer.h b/ttxtsubsdisplayer.h index 1feda0f..66f420a 100644 --- a/ttxtsubsdisplayer.h +++ b/ttxtsubsdisplayer.h @@ -47,7 +47,7 @@ class cTtxtSubsPlayer : public cTtxtSubsDisplayer { private: void SearchLanguagePage(uint8_t *p, int len); - bool SetPreferredPage(const char* language, bool hearingImpaired, unsigned int page); + bool SetPreferredPage(const char* language, bool hearingImpaired, unsigned int bcdPage); int mHasFilteredStream; int mFoundLangPage; |