Skip to content

Commit fa8a4ad

Browse files
committed
Fix bit mask for PCR_PID extraction
Tsukumi reported the issue, thunks.
1 parent ac780f1 commit fa8a4ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

id3conv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void CID3Converter::AddPmt(int pid, const PSI &psi)
123123
}
124124
const uint8_t *table = psi.data;
125125
int serviceID = (table[3] << 8) | table[4];
126-
m_pcrPid = ((table[8] & 0x03) << 8) | table[9];
126+
m_pcrPid = ((table[8] & 0x1f) << 8) | table[9];
127127
if (m_pcrPid == 0x1fff) {
128128
m_pcr = -1;
129129
}

servicefilter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void CServiceFilter::AddPmt(const PSI &psi)
233233
}
234234
const uint8_t *table = psi.data;
235235
int programNumber = (table[3] << 8) | table[4];
236-
m_pcrPid = ((table[8] & 0x03) << 8) | table[9];
236+
m_pcrPid = ((table[8] & 0x1f) << 8) | table[9];
237237
if (m_pcrPid == 0x1fff) {
238238
m_pcr = -1;
239239
}

0 commit comments

Comments
 (0)