mirror of
https://github.com/samsonjs/media.git
synced 2026-04-26 14:57:47 +00:00
Fix usage of ParsableByteArray in PgsDecoder
This is a partial revert of
46598a46fd
The change from reset(int) to setPosition/Limit() in this file was
incorrect, the reset(int) call is important because it ensures
`bitmapData` is large enough for the `buffer.readBytes` call on L188.
Issue: #8417
PiperOrigin-RevId: 351110038
This commit is contained in:
parent
ba1ebe7844
commit
361e80f40c
1 changed files with 1 additions and 2 deletions
|
|
@ -177,8 +177,7 @@ public final class PgsDecoder extends SimpleSubtitleDecoder {
|
||||||
}
|
}
|
||||||
bitmapWidth = buffer.readUnsignedShort();
|
bitmapWidth = buffer.readUnsignedShort();
|
||||||
bitmapHeight = buffer.readUnsignedShort();
|
bitmapHeight = buffer.readUnsignedShort();
|
||||||
bitmapData.setPosition(0);
|
bitmapData.reset(totalLength - 4);
|
||||||
bitmapData.setLimit(totalLength - 4);
|
|
||||||
sectionLength -= 7;
|
sectionLength -= 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue