mirror of
https://github.com/samsonjs/media.git
synced 2026-04-22 14:05:55 +00:00
CEA-708 Decoder fixes for issue #1807
Fixed the verticalAnchorType and horizontalAnchorType calculation The anchorID 0, 1 and 2 should correspond to verticalAnchorType=ANCHOR_TYPE_START, anchorID 3, 4, 5 is ANCHOR_TYPE_MIDDLE, anchorID 6, 7 and 8 is ANCHOR_TYPE_END The anchorID 0, 3 and 6 should correspond to horizzonatlAnchor=ANCHOR_TYPE_START, anchorID 1, 4, 7 is ANCHOR_TYPE_MIDDLE, anchorID 2, 5 and 8 is ANCHOR_TYPE_END
This commit is contained in:
parent
4907cf877a
commit
b70f08b740
1 changed files with 4 additions and 4 deletions
|
|
@ -1226,18 +1226,18 @@ public final class Cea708Decoder extends CeaDecoder {
|
|||
// | |
|
||||
// 6-----7-----8
|
||||
@AnchorType int verticalAnchorType;
|
||||
if (anchorId % 3 == 0) {
|
||||
if (anchorId / 3 == 0) {
|
||||
verticalAnchorType = Cue.ANCHOR_TYPE_START;
|
||||
} else if (anchorId % 3 == 1) {
|
||||
} else if (anchorId / 3 == 1) {
|
||||
verticalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
||||
} else {
|
||||
verticalAnchorType = Cue.ANCHOR_TYPE_END;
|
||||
}
|
||||
// TODO: Add support for right-to-left languages (i.e. where start is on the right).
|
||||
@AnchorType int horizontalAnchorType;
|
||||
if (anchorId / 3 == 0) {
|
||||
if (anchorId % 3 == 0) {
|
||||
horizontalAnchorType = Cue.ANCHOR_TYPE_START;
|
||||
} else if (anchorId / 3 == 1) {
|
||||
} else if (anchorId % 3 == 1) {
|
||||
horizontalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
||||
} else {
|
||||
horizontalAnchorType = Cue.ANCHOR_TYPE_END;
|
||||
|
|
|
|||
Loading…
Reference in a new issue