mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
fix the end point of span exceeds the length of SpannableStringBuilder
This commit is contained in:
parent
af4028f30e
commit
4bc392a8ef
1 changed files with 3 additions and 0 deletions
|
|
@ -185,6 +185,9 @@ public final class Tx3gDecoder extends SimpleSubtitleDecoder {
|
|||
int fontFace = parsableByteArray.readUnsignedByte();
|
||||
parsableByteArray.skipBytes(1); // font size
|
||||
int colorRgba = parsableByteArray.readInt();
|
||||
if (end > cueText.length()) {
|
||||
end = cueText.length();
|
||||
}
|
||||
attachFontFace(cueText, fontFace, defaultFontFace, start, end, SPAN_PRIORITY_HIGH);
|
||||
attachColor(cueText, colorRgba, defaultColorRgba, start, end, SPAN_PRIORITY_HIGH);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue