Skip to content

Commit 813581f

Browse files
committed
Format with google-java-format and add release note
1 parent dad747a commit 813581f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: RELEASENOTES.md

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
* Text:
6868
* Fix issue where subtitles starting before a seek position are skipped.
6969
This issue was only introduced in Media3 1.4.0-alpha01.
70+
* PGS: Fix run-length decoding to resolve `0` as a color index, instead of
71+
a literal color value
72+
([#1367](https://github.com/androidx/media/pull/1367)).
7073
* Metadata:
7174
* Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort'
7275
(`soal`), 'artist sort' (`soar`) and 'album artist sort' (`soaa`) MP4

Diff for: libraries/extractor/src/main/java/androidx/media3/extractor/text/pgs/PgsParser.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ public Cue build() {
248248
(switchBits & 0x40) == 0
249249
? (switchBits & 0x3F)
250250
: (((switchBits & 0x3F) << 8) | bitmapData.readUnsignedByte());
251-
int color = (switchBits & 0x80) == 0 ? colors[0] : colors[bitmapData.readUnsignedByte()];
251+
int color =
252+
(switchBits & 0x80) == 0 ? colors[0] : colors[bitmapData.readUnsignedByte()];
252253
Arrays.fill(
253254
argbBitmapData, argbBitmapDataIndex, argbBitmapDataIndex + runLength, color);
254255
argbBitmapDataIndex += runLength;

0 commit comments

Comments
 (0)