mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08: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
@ -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…
x
Reference in New Issue
Block a user