diff -rupN old//ttxtsubsdisplay.c new//ttxtsubsdisplay.c --- old//ttxtsubsdisplay.c 2012-03-26 13:28:30.000000000 +0300 +++ new//ttxtsubsdisplay.c 2012-04-02 11:37:49.000000000 +0300 @@ -437,7 +437,7 @@ void cTtxtSubsDisplay::ShowOSD(void) { int lineWidth = _osdFont->Width(_subTitleTextLines[textLineIndex].text) + 2 * globals.mOutlineWidth + 5; int lineHeight = (textHeight / _numberOfSubTitleTextLines); - int x = (width - lineWidth) / 2; + int x = 4; // start subtitles from the left edge for readability int y = lineHeight * textLineIndex + globals.mOutlineWidth + 5; tColor foregroundColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][0]; tColor outlineColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][1]; diff -rupN old//ttxtsubsdisplayer.c new//ttxtsubsdisplayer.c --- old//ttxtsubsdisplayer.c 2012-03-26 13:28:30.000000000 +0300 +++ new//ttxtsubsdisplayer.c 2012-04-02 11:35:59.000000000 +0300 @@ -31,7 +31,7 @@ cTtxtSubsDisplayer::cTtxtSubsDisplayer(i mDisp(new cTtxtSubsDisplay()), mGetMutex(), mGetCond(), - mRingBuf(94000, true), + mRingBuf(188000, true), mRun(0) { mDisp->SetPage(textpage); @@ -121,9 +121,17 @@ void cTtxtSubsPlayer::PES_data(uchar *p, if (ch >= 0 && ch < mLangChoise) { mLangChoise = ch; int bcdPage = (teletextSubtitlePages[p].ttxtMagazine << 8) + teletextSubtitlePages[p].ttxtPage; + // 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 can make a hard fix for this! + if(bcdPage >= 0x50 && bcdPage <= 0x59) + bcdPage += 0x30; mDisp->SetPage(bcdPage); mFoundLangPage = 1; - isyslog("Found subtitle TT page: %03x\n", bcdPage); + if(bcdPage < 0x100) // Shown on log according to ETSI standard + bcdPage += 0x800; + isyslog("Found subtitle page: %03x\n", bcdPage); } } }