mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
parent
cbb2cfbf81
commit
50d5cbea70
1 changed files with 8 additions and 3 deletions
|
|
@ -220,9 +220,14 @@ public final class TsExtractor implements Extractor {
|
||||||
int programCount = (sectionLength - 9) / 4;
|
int programCount = (sectionLength - 9) / 4;
|
||||||
for (int i = 0; i < programCount; i++) {
|
for (int i = 0; i < programCount; i++) {
|
||||||
data.readBytes(patScratch, 4);
|
data.readBytes(patScratch, 4);
|
||||||
patScratch.skipBits(19); // program_number (16), reserved (3)
|
int programNumber = patScratch.readBits(16);
|
||||||
int pid = patScratch.readBits(13);
|
patScratch.skipBits(3); // reserved (3)
|
||||||
tsPayloadReaders.put(pid, new PmtReader());
|
if (programNumber == 0) {
|
||||||
|
patScratch.skipBits(13); // network_PID (13)
|
||||||
|
} else {
|
||||||
|
int pid = patScratch.readBits(13);
|
||||||
|
tsPayloadReaders.put(pid, new PmtReader());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip CRC_32.
|
// Skip CRC_32.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue