Commit 4cd8f00d by aquilescanta Committed by kim-vde

Avoid setting a PMT reader if one exists for the same PID

This change should only affect HLS, where we don't remove the
PAT reader after reading a PAT.

Issue: #7756
PiperOrigin-RevId: 327008936
parent f2d2e647
...@@ -484,8 +484,10 @@ public final class TsExtractor implements Extractor { ...@@ -484,8 +484,10 @@ public final class TsExtractor implements Extractor {
patScratch.skipBits(13); // network_PID (13) patScratch.skipBits(13); // network_PID (13)
} else { } else {
int pid = patScratch.readBits(13); int pid = patScratch.readBits(13);
tsPayloadReaders.put(pid, new SectionReader(new PmtReader(pid))); if (tsPayloadReaders.get(pid) == null) {
remainingPmts++; tsPayloadReaders.put(pid, new SectionReader(new PmtReader(pid)));
remainingPmts++;
}
} }
} }
if (mode != MODE_HLS) { if (mode != MODE_HLS) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment