Fix TsExtractor bug.

The limit on the ts packet buffer can be reduced during processing
if it's discovered to have padding. Hence we need to reset it back
to the ts packet size before processing each packet.
This commit is contained in:
Oliver Woodman 2015-04-10 23:41:45 +01:00
parent 61443b2f12
commit fc176b9cbe

View File

@ -75,6 +75,7 @@ public final class TsExtractor implements HlsExtractor {
}
tsPacketBuffer.setPosition(0);
tsPacketBuffer.setLimit(TS_PACKET_SIZE);
int syncByte = tsPacketBuffer.readUnsignedByte();
if (syncByte != TS_SYNC_BYTE) {
return;