mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
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:
parent
61443b2f12
commit
fc176b9cbe
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue