Skip to content

Commit e0a5b94

Browse files
authored
Merge pull request #3696 from WXbet/fix-isScrambledPMT
[cahandler] Fix wrong offsets in buildCAPMT(eDVBService) after Protocol-3 header
2 parents 5f5c253 + 74447fb commit e0a5b94

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/dvb/cahandler.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,6 @@ int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)
10911091
pidtype[eDVBService::cDDPPID] = 0x06;
10921092
pidtype[eDVBService::cAACAPID] = 0x06;
10931093
pidtype[eDVBService::cDATAPID] = 0x90; // Datastream (Blu-ray subtitling)
1094-
pidtype[eDVBService::cPMTPID] = 0x0d; // Datastream (DSM CC)
10951094

10961095
// cached pids
10971096
for (int x = 0; x < eDVBService::cacheMax; ++x)
@@ -1117,12 +1116,12 @@ int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)
11171116
}
11181117
}
11191118

1120-
// calculate capmt length
1121-
m_capmt[3] = pos - 9;
1119+
// calculate capmt length (offset 8 = position 3 after 5-byte protocol header)
1120+
m_capmt[8] = pos - 9;
11221121

1123-
// calculate programinfo leght
1124-
m_capmt[8] = programInfoLength>>8;
1125-
m_capmt[9] = programInfoLength&0xFF;
1122+
// calculate programinfo length (offset 13/14 = position 8/9 after 5-byte protocol header)
1123+
m_capmt[13] = programInfoLength>>8;
1124+
m_capmt[14] = programInfoLength&0xFF;
11261125

11271126
m_prev_build_hash = build_hash;
11281127
m_version = pmt_version;

0 commit comments

Comments
 (0)