Created
October 12, 2014 16:11
-
-
Save anonymous/e6dcc442723df013cfa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/BonDriver_LinuxPT.cpp b/BonDriver_LinuxPT.cpp | |
index 785645f..57d3639 100644 | |
--- a/BonDriver_LinuxPT.cpp | |
+++ b/BonDriver_LinuxPT.cpp | |
@@ -622,7 +622,7 @@ void *cBonDriverLinuxPT::TsSplitter(LPVOID pv) | |
BYTE *pTsBuf, pPAT[TS_PKTSIZE]; | |
BYTE pPMT[4104+TS_PKTSIZE]; // 4104 = 8(TSヘッダ + pointer_field + table_idからsection_length) + 4096(セクション長最大値) | |
int pos; | |
- unsigned char pat_ci, pmt_ci, lcat_version; | |
+ unsigned char pat_ci, pmt_ci, lcat_version, lpmt_version; | |
unsigned short ltsid, pidPMT, pidEMM, pmt_tail; | |
BOOL bChangePMT, bSplitPMT; | |
pid_set pids; | |
@@ -630,7 +630,7 @@ void *cBonDriverLinuxPT::TsSplitter(LPVOID pv) | |
pTsBuf = new BYTE[TS_BUFSIZE]; | |
pos = 0; | |
pat_ci = 0x10; // 0x1(payloadのみ) << 4 | 0x0(ci初期値) | |
- lcat_version = 0xff; | |
+ lcat_version = lpmt_version = 0xff; | |
ltsid = pidPMT = pidEMM = 0xffff; // 現在のTSID及びPMT,EMMのPID | |
bChangePMT = bSplitPMT = FALSE; | |
PID_ZERO(&pids); | |
@@ -808,8 +808,10 @@ void *cBonDriverLinuxPT::TsSplitter(LPVOID pv) | |
} | |
else if(pid == pidPMT) // PMT | |
{ | |
- if (bChangePMT) // PMTが変更された | |
+ unsigned short pmt_version = (pSrc[10] & 0x3e) >> 1; | |
+ if (bChangePMT || pmt_version != lpmt_version) // PMTが変更された | |
{ | |
+ lpmt_version = pmt_version; | |
int len; | |
BYTE *p; | |
// payload先頭を待つ(ビットエラー無し、adaptation_field無し、PSIのpointer_fieldは0x00の前提) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment