Format with google-java-format and add release note

This commit is contained in:
Ian Baker 2024-05-15 10:45:41 +01:00
parent d2f677bc4c
commit 743e7942b6
2 changed files with 5 additions and 1 deletions

View File

@ -82,6 +82,9 @@
* Apps with custom `SubtitleDecoder` implementations need to update
them to implement `SubtitleParser` instead (and
`SubtitleParser.Factory` instead of `SubtitleDecoderFactory`).
* PGS: Fix run-length decoding to resolve `0` as a color index, instead of
a literal color value
([#1367](https://github.com/androidx/media/pull/1367)).
* Metadata:
* Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort'
(`soal`), 'artist sort' (`soar`) and 'album artist sort' (`soaa`) MP4

View File

@ -248,7 +248,8 @@ public final class PgsParser implements SubtitleParser {
(switchBits & 0x40) == 0
? (switchBits & 0x3F)
: (((switchBits & 0x3F) << 8) | bitmapData.readUnsignedByte());
int color = (switchBits & 0x80) == 0 ? colors[0] : colors[bitmapData.readUnsignedByte()];
int color =
(switchBits & 0x80) == 0 ? colors[0] : colors[bitmapData.readUnsignedByte()];
Arrays.fill(
argbBitmapData, argbBitmapDataIndex, argbBitmapDataIndex + runLength, color);
argbBitmapDataIndex += runLength;