From afc19bf6dba83e49b5261fe7db78311b803af0e2 Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 14 Jun 2018 02:23:28 -0700 Subject: [PATCH] CEA608 - Add space when handling mid-row codes Issue: #3906 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200526335 --- RELEASENOTES.md | 2 ++ .../com/google/android/exoplayer2/text/cea/Cea608Decoder.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 125d8aaf49..5373a26359 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -45,6 +45,8 @@ ([#4315](https://github.com/google/ExoPlayer/issues/4315)). * Set `METADATA_KEY_TITLE` on media descriptions ((#4292)[https://github.com/google/ExoPlayer/issues/4292]). +* Fix missing whitespace in CEA-608 + ([#3906](https://github.com/google/ExoPlayer/issues/3906)). ### 2.8.1 ### diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java index f018e055fb..57614ae880 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java @@ -374,6 +374,9 @@ public final class Cea608Decoder extends CeaDecoder { private void handleMidrowCtrl(byte cc2) { // TODO: support the extended styles (i.e. backgrounds and transparencies) + // A midrow control code advances the cursor. + currentCueBuilder.append(' '); + // cc2 - 0|0|1|0|ATRBT|U // ATRBT is the 3-byte encoded attribute, and U is the underline toggle boolean isUnderlined = (cc2 & 0x01) == 0x01;