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

Fixed (well, actually worked around) a problem with subtitles not being displayed because the broadcaster doesn't set the data's version numbers as required by the DVB standard

This commit is contained in:
Klaus Schmidinger 2015-01-09 12:03:31 +01:00
parent 7fac1d4ae2
commit 77173b7057
3 changed files with 34 additions and 17 deletions

View File

@ -1190,6 +1190,8 @@ Rolf Ahrenberg <Rolf.Ahrenberg@sci.fi>
registered
for adding support for "Pilot", "T2-System-Id" and "SISO/MISO" parameters
for increasing the PMT_SCAN_TIMEOUT to avoid timeouts when scanning PMTs
for fixing a problem with subtitles not being displayed because the broadcaster
doesn't set the data's version numbers as required by the DVB standard
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark

View File

@ -8340,3 +8340,6 @@ Video Disk Recorder Revision History
(reported by Dietmar Spingler).
- Fixed resetting the receiver for EMM pids for CAMs that need to receive the TS
(reported by Dietmar Spingler).
- Fixed (well, actually worked around) a problem with subtitles not being displayed
because the broadcaster doesn't set the data's version numbers as required by the
DVB standard (thanks to Rolf Ahrenberg).

View File

@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
* $Id: dvbsubtitle.c 3.6 2015/01/04 15:46:39 kls Exp $
* $Id: dvbsubtitle.c 3.7 2015/01/09 11:56:25 kls Exp $
*/
#include "dvbsubtitle.h"
@ -53,6 +53,8 @@ static bool DebugOutput = DebugVerbose;
#define DBGMAXBITMAPS 100 // debug output will be stopped after this many bitmaps
#define DBGBITMAPWIDTH 400
#define FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY // some don't properly handle version numbers, which renders them useless because subtitles are not displayed
// --- cSubtitleDebug --------------------------------------------------------
class cSubtitleDebug {
@ -221,8 +223,10 @@ cSubtitleClut::cSubtitleClut(int ClutId)
void cSubtitleClut::Parse(cBitStream &bs)
{
int Version = bs.GetBits(4);
#ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
if (clutVersionNumber == Version)
return; // no update
#endif
clutVersionNumber = Version;
bs.SkipBits(4); // reserved
dbgcluts("<b>clut</b> id %d version %d<br>\n", clutId, clutVersionNumber);
@ -355,8 +359,10 @@ cSubtitleObject::~cSubtitleObject()
void cSubtitleObject::Parse(cBitStream &bs)
{
int Version = bs.GetBits(4);
#ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
if (objectVersionNumber == Version)
return; // no update
#endif
objectVersionNumber = Version;
objectCodingMethod = bs.GetBits(2);
nonModifyingColorFlag = bs.GetBit();
@ -740,8 +746,10 @@ cSubtitleRegion::cSubtitleRegion(int RegionId)
void cSubtitleRegion::Parse(cBitStream &bs)
{
int Version = bs.GetBits(4);
#ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
if (regionVersionNumber == Version)
return; // no update
#endif
regionVersionNumber = Version;
regionFillFlag = bs.GetBit();
bs.SkipBits(3); // reserved
@ -849,8 +857,10 @@ void cDvbSubtitlePage::Parse(int64_t Pts, cBitStream &bs)
pts = Pts;
pageTimeout = bs.GetBits(8);
int Version = bs.GetBits(4);
#ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
if (pageVersionNumber == Version)
return; // no update
#endif
pageVersionNumber = Version;
pageState = bs.GetBits(2);
switch (pageState) {
@ -1387,7 +1397,10 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
case DISPLAY_DEFINITION_SEGMENT: {
dbgsegments("DISPLAY_DEFINITION_SEGMENT<br>\n");
int version = bs.GetBits(4);
if (version != ddsVersionNumber) {
#ifndef FIX_SUBTITLE_VERSION_BROADCASTER_STUPIDITY
if (version == ddsVersionNumber)
break; // no update
#endif
bool displayWindowFlag = bs.GetBit();
windowHorizontalOffset = 0;
windowVerticalOffset = 0;
@ -1403,7 +1416,6 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
SetOsdData();
ddsVersionNumber = version;
dbgdisplay("<b>display</b> version %d flag %d width %d height %d ofshor %d ofsver %d<br>\n", ddsVersionNumber, displayWindowFlag, windowWidth, windowHeight, windowHorizontalOffset, windowVerticalOffset);
}
break;
}
case DISPARITY_SIGNALING_SEGMENT: {