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
14915fd1
authored
May 14, 2019
by
bachinger
Committed by
Oliver Woodman
May 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix rendering DVB subtitle on API 28.
Issue: #5862 PiperOrigin-RevId: 248112524
parent
50c9ae0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java
RELEASENOTES.md
View file @
14915fd1
...
...
@@ -22,6 +22,8 @@
48kHz audio (
[
#5821
](
https://github.com/google/ExoPlayer/issues/5821
)
).
*
Add a workaround for broken raw audio decoding on Oppo R9
(
[
#5782
](
https://github.com/google/ExoPlayer/issues/5782
)
).
*
Fix DVB subtitles for SDK 28
(
[
#5862
](
https://github.com/google/ExoPlayer/issues/5862
)
).
### 2.10.0 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java
View file @
14915fd1
...
...
@@ -21,7 +21,6 @@ import android.graphics.Color;
import
android.graphics.Paint
;
import
android.graphics.PorterDuff
;
import
android.graphics.PorterDuffXfermode
;
import
android.graphics.Region
;
import
android.util.SparseArray
;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.util.Log
;
...
...
@@ -150,6 +149,8 @@ import java.util.List;
List
<
Cue
>
cues
=
new
ArrayList
<>();
SparseArray
<
PageRegion
>
pageRegions
=
subtitleService
.
pageComposition
.
regions
;
for
(
int
i
=
0
;
i
<
pageRegions
.
size
();
i
++)
{
// Save clean clipping state.
canvas
.
save
();
PageRegion
pageRegion
=
pageRegions
.
valueAt
(
i
);
int
regionId
=
pageRegions
.
keyAt
(
i
);
RegionComposition
regionComposition
=
subtitleService
.
regions
.
get
(
regionId
);
...
...
@@ -163,9 +164,7 @@ import java.util.List;
displayDefinition
.
horizontalPositionMaximum
);
int
clipBottom
=
Math
.
min
(
baseVerticalAddress
+
regionComposition
.
height
,
displayDefinition
.
verticalPositionMaximum
);
canvas
.
clipRect
(
baseHorizontalAddress
,
baseVerticalAddress
,
clipRight
,
clipBottom
,
Region
.
Op
.
REPLACE
);
canvas
.
clipRect
(
baseHorizontalAddress
,
baseVerticalAddress
,
clipRight
,
clipBottom
);
ClutDefinition
clutDefinition
=
subtitleService
.
cluts
.
get
(
regionComposition
.
clutId
);
if
(
clutDefinition
==
null
)
{
clutDefinition
=
subtitleService
.
ancillaryCluts
.
get
(
regionComposition
.
clutId
);
...
...
@@ -214,9 +213,11 @@ import java.util.List;
(
float
)
regionComposition
.
height
/
displayDefinition
.
height
));
canvas
.
drawColor
(
Color
.
TRANSPARENT
,
PorterDuff
.
Mode
.
CLEAR
);
// Restore clean clipping state.
canvas
.
restore
();
}
return
cues
;
return
Collections
.
unmodifiableList
(
cues
)
;
}
// Static parsing.
...
...
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