Skip to content

Commit

Permalink
Update PgsParser.java
Browse files Browse the repository at this point in the history
Fix "subtitles rendered with border and no fill color" problem:
moneytoo/Player#413

because '0' means it's an index to the palette table, not an RGBA value of 0
  • Loading branch information
SimonHung authored Jan 19, 2024
1 parent b930b40 commit 1a65c69
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public Cue build() {
(switchBits & 0x40) == 0
? (switchBits & 0x3F)
: (((switchBits & 0x3F) << 8) | bitmapData.readUnsignedByte());
int color = (switchBits & 0x80) == 0 ? 0 : colors[bitmapData.readUnsignedByte()];
int color = (switchBits & 0x80) == 0 ? colors[0] : colors[bitmapData.readUnsignedByte()];
Arrays.fill(
argbBitmapData, argbBitmapDataIndex, argbBitmapDataIndex + runLength, color);
argbBitmapDataIndex += runLength;
Expand Down

0 comments on commit 1a65c69

Please sign in to comment.