Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a94fa330
authored
Nov 30, 2018
by
olly
Committed by
Oliver Woodman
Dec 01, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Prevent Cea608Decoder from generating Subtitles with null Cues list.
PiperOrigin-RevId: 223580953
parent
c55d9508
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java
library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java
View file @
a94fa330
...
@@ -33,6 +33,7 @@ import com.google.android.exoplayer2.text.SubtitleInputBuffer;
...
@@ -33,6 +33,7 @@ import com.google.android.exoplayer2.text.SubtitleInputBuffer;
import
com.google.android.exoplayer2.util.MimeTypes
;
import
com.google.android.exoplayer2.util.MimeTypes
;
import
com.google.android.exoplayer2.util.ParsableByteArray
;
import
com.google.android.exoplayer2.util.ParsableByteArray
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -451,7 +452,7 @@ public final class Cea608Decoder extends CeaDecoder {
...
@@ -451,7 +452,7 @@ public final class Cea608Decoder extends CeaDecoder {
switch
(
cc2
)
{
switch
(
cc2
)
{
case
CTRL_ERASE_DISPLAYED_MEMORY:
case
CTRL_ERASE_DISPLAYED_MEMORY:
cues
=
null
;
cues
=
Collections
.
emptyList
()
;
if
(
captionMode
==
CC_MODE_ROLL_UP
||
captionMode
==
CC_MODE_PAINT_ON
)
{
if
(
captionMode
==
CC_MODE_ROLL_UP
||
captionMode
==
CC_MODE_PAINT_ON
)
{
resetCueBuilders
();
resetCueBuilders
();
}
}
...
@@ -506,7 +507,7 @@ public final class Cea608Decoder extends CeaDecoder {
...
@@ -506,7 +507,7 @@ public final class Cea608Decoder extends CeaDecoder {
if
(
oldCaptionMode
==
CC_MODE_PAINT_ON
||
captionMode
==
CC_MODE_ROLL_UP
if
(
oldCaptionMode
==
CC_MODE_PAINT_ON
||
captionMode
==
CC_MODE_ROLL_UP
||
captionMode
==
CC_MODE_UNKNOWN
)
{
||
captionMode
==
CC_MODE_UNKNOWN
)
{
// When switching from paint-on or to roll-up or unknown, we also need to clear the caption.
// When switching from paint-on or to roll-up or unknown, we also need to clear the caption.
cues
=
null
;
cues
=
Collections
.
emptyList
()
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment