mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Fix replacement char check
PiperOrigin-RevId: 227646358
This commit is contained in:
parent
6373554d6a
commit
f11abbda97
@ -103,6 +103,9 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
|
|
||||||
private static final String LANGUAGE_UNDEFINED = "und";
|
private static final String LANGUAGE_UNDEFINED = "und";
|
||||||
|
|
||||||
|
private static final int TYPE_TOP_BYTE_COPYRIGHT = 0xA9;
|
||||||
|
private static final int TYPE_TOP_BYTE_REPLACEMENT = 0xFD; // Truncated value of \uFFFD.
|
||||||
|
|
||||||
private MetadataUtil() {}
|
private MetadataUtil() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,8 +122,7 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
int type = ilst.readInt();
|
int type = ilst.readInt();
|
||||||
int typeTopByte = (type >> 24) & 0xFF;
|
int typeTopByte = (type >> 24) & 0xFF;
|
||||||
try {
|
try {
|
||||||
if (typeTopByte == '\u00A9' /* Copyright char */
|
if (typeTopByte == TYPE_TOP_BYTE_COPYRIGHT || typeTopByte == TYPE_TOP_BYTE_REPLACEMENT) {
|
||||||
|| typeTopByte == '\uFFFD' /* Replacement char */) {
|
|
||||||
int shortType = type & 0x00FFFFFF;
|
int shortType = type & 0x00FFFFFF;
|
||||||
if (shortType == SHORT_TYPE_COMMENT) {
|
if (shortType == SHORT_TYPE_COMMENT) {
|
||||||
return parseCommentAttribute(type, ilst);
|
return parseCommentAttribute(type, ilst);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user