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
This commit is contained in:
aquilescanta 2020-08-17 14:28:40 +01:00 committed by kim-vde
parent f2d2e6475a
commit 4cd8f00d72

View file

@ -484,8 +484,10 @@ public final class TsExtractor implements Extractor {
patScratch.skipBits(13); // network_PID (13)
} else {
int pid = patScratch.readBits(13);
tsPayloadReaders.put(pid, new SectionReader(new PmtReader(pid)));
remainingPmts++;
if (tsPayloadReaders.get(pid) == null) {
tsPayloadReaders.put(pid, new SectionReader(new PmtReader(pid)));
remainingPmts++;
}
}
}
if (mode != MODE_HLS) {