Merge pull request #8357 from TiVo:p-fix-cea708anchor
PiperOrigin-RevId: 348440799
This commit is contained in:
commit
5e47c3c5e5
@ -67,6 +67,8 @@
|
|||||||
* Text:
|
* Text:
|
||||||
* Gracefully handle null-terminated subtitle content in Matroska
|
* Gracefully handle null-terminated subtitle content in Matroska
|
||||||
containers.
|
containers.
|
||||||
|
* Fix CEA-708 anchor positioning
|
||||||
|
([#1807](https://github.com/google/ExoPlayer/issues/1807)).
|
||||||
* OkHttp extension:
|
* OkHttp extension:
|
||||||
* Add `OkHttpDataSource.Factory` and deprecate `OkHttpDataSourceFactory`.
|
* Add `OkHttpDataSource.Factory` and deprecate `OkHttpDataSourceFactory`.
|
||||||
* Media2 extension
|
* Media2 extension
|
||||||
|
@ -1226,18 +1226,18 @@ public final class Cea708Decoder extends CeaDecoder {
|
|||||||
// | |
|
// | |
|
||||||
// 6-----7-----8
|
// 6-----7-----8
|
||||||
@AnchorType int verticalAnchorType;
|
@AnchorType int verticalAnchorType;
|
||||||
if (anchorId % 3 == 0) {
|
if (anchorId / 3 == 0) {
|
||||||
verticalAnchorType = Cue.ANCHOR_TYPE_START;
|
verticalAnchorType = Cue.ANCHOR_TYPE_START;
|
||||||
} else if (anchorId % 3 == 1) {
|
} else if (anchorId / 3 == 1) {
|
||||||
verticalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
verticalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
||||||
} else {
|
} else {
|
||||||
verticalAnchorType = Cue.ANCHOR_TYPE_END;
|
verticalAnchorType = Cue.ANCHOR_TYPE_END;
|
||||||
}
|
}
|
||||||
// TODO: Add support for right-to-left languages (i.e. where start is on the right).
|
// TODO: Add support for right-to-left languages (i.e. where start is on the right).
|
||||||
@AnchorType int horizontalAnchorType;
|
@AnchorType int horizontalAnchorType;
|
||||||
if (anchorId / 3 == 0) {
|
if (anchorId % 3 == 0) {
|
||||||
horizontalAnchorType = Cue.ANCHOR_TYPE_START;
|
horizontalAnchorType = Cue.ANCHOR_TYPE_START;
|
||||||
} else if (anchorId / 3 == 1) {
|
} else if (anchorId % 3 == 1) {
|
||||||
horizontalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
horizontalAnchorType = Cue.ANCHOR_TYPE_MIDDLE;
|
||||||
} else {
|
} else {
|
||||||
horizontalAnchorType = Cue.ANCHOR_TYPE_END;
|
horizontalAnchorType = Cue.ANCHOR_TYPE_END;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user