mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add comments about needing the size in the IDX file.
This commit is contained in:
parent
27a6883768
commit
250bc86669
@ -141,6 +141,10 @@ public final class VobsubParser implements SubtitleParser {
|
|||||||
palette[i] = parseColor(values[i].trim());
|
palette[i] = parseColor(values[i].trim());
|
||||||
}
|
}
|
||||||
} else if (line.startsWith("size: ")) {
|
} else if (line.startsWith("size: ")) {
|
||||||
|
|
||||||
|
// NOTE: we need this line to calculate the relative positions
|
||||||
|
// and size required by Cue.Builder() below.
|
||||||
|
|
||||||
String[] sizes = line.substring(6).trim().split("x");
|
String[] sizes = line.substring(6).trim().split("x");
|
||||||
|
|
||||||
if (sizes.length == 2) {
|
if (sizes.length == 2) {
|
||||||
@ -166,6 +170,9 @@ public final class VobsubParser implements SubtitleParser {
|
|||||||
|
|
||||||
public void parseSpu(ParsableByteArray buffer) {
|
public void parseSpu(ParsableByteArray buffer) {
|
||||||
|
|
||||||
|
// Give up if don't have the color palette or the video size.
|
||||||
|
// (See also the NOTE above)
|
||||||
|
|
||||||
if (palette == null || !hasPlane) return;
|
if (palette == null || !hasPlane) return;
|
||||||
|
|
||||||
int pos = buffer.getPosition();
|
int pos = buffer.getPosition();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user