mirror of
https://github.com/samsonjs/media.git
synced 2026-04-02 10:45:51 +00:00
Fixed an issue with Cea608Decoder in which tab commands were not being used correctly.
Tab commands were being used cumulatively (i.e. moving the cursor farther and farther over) resulting in the text eventually trying to write beyond the bounds of the screen and throwing an exception. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146783284
This commit is contained in:
parent
7c8a3d006d
commit
de46ed7fb9
1 changed files with 3 additions and 3 deletions
|
|
@ -364,7 +364,7 @@ public final class Cea608Decoder extends CeaDecoder {
|
|||
} else if (isPreambleAddressCode(cc1, cc2)) {
|
||||
handlePreambleAddressCode(cc1, cc2);
|
||||
} else if (isTabCtrlCode(cc1, cc2)) {
|
||||
currentCueBuilder.tab(cc2 - 0x20);
|
||||
currentCueBuilder.setTab(cc2 - 0x20);
|
||||
} else if (isMiscCode(cc1, cc2)) {
|
||||
handleMiscCode(cc2);
|
||||
}
|
||||
|
|
@ -646,8 +646,8 @@ public final class Cea608Decoder extends CeaDecoder {
|
|||
this.indent = indent;
|
||||
}
|
||||
|
||||
public void tab(int tabs) {
|
||||
tabOffset += tabs;
|
||||
public void setTab(int tabs) {
|
||||
tabOffset = tabs;
|
||||
}
|
||||
|
||||
public void setPreambleStyle(CharacterStyle style) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue