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
513185b7
authored
May 27, 2021
by
olly
Committed by
Oliver Woodman
May 27, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix incorrect re-use of non-secure DummySurface with secure decoder
Issue: #8776 PiperOrigin-RevId: 376186877
parent
2938d40b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
RELEASENOTES.md
View file @
513185b7
...
@@ -47,6 +47,12 @@
...
@@ -47,6 +47,12 @@
*
Remove
`CastPlayer`
specific playlist manipulation methods. Use
*
Remove
`CastPlayer`
specific playlist manipulation methods. Use
`setMediaItems`
,
`addMediaItems`
,
`removeMediaItem`
and
`moveMediaItem`
`setMediaItems`
,
`addMediaItems`
,
`removeMediaItem`
and
`moveMediaItem`
instead.
instead.
*
Video:
*
Fix bug that could cause
`CodecException: Error 0xffffffff`
to be thrown
from
`MediaCodec.native_setSurface`
in use cases that involve both
swapping the output
`Surface`
and a mixture of secure and non-secure
content being played
(
[
#8776
](
https://github.com/google/ExoPlayer/issues/8776
)
).
*
Ad playback:
*
Ad playback:
*
Support changing ad break positions in the player logic
*
Support changing ad break positions in the player logic
(
[
#5067
](
https://github.com/google/ExoPlayer/issues/5067
)
.
(
[
#5067
](
https://github.com/google/ExoPlayer/issues/5067
)
.
...
@@ -66,7 +72,6 @@
...
@@ -66,7 +72,6 @@
*
Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko)
*
Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko)
in
`Cue.text`
even when
`SubtitleView#setApplyEmbeddedStyles()`
is
in
`Cue.text`
even when
`SubtitleView#setApplyEmbeddedStyles()`
is
false.
false.
*
UI
*
Fix
`NullPointerException`
in
`StyledPlayerView`
that could occur after
*
Fix
`NullPointerException`
in
`StyledPlayerView`
that could occur after
calling
`StyledPlayerView.setPlayer(null)`
calling
`StyledPlayerView.setPlayer(null)`
(
[
#8985
](
https://github.com/google/ExoPlayer/issues/8985
)
).
(
[
#8985
](
https://github.com/google/ExoPlayer/issues/8985
)
).
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
513185b7
...
@@ -124,7 +124,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -124,7 +124,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
private
boolean
codecHandlesHdr10PlusOutOfBandMetadata
;
private
boolean
codecHandlesHdr10PlusOutOfBandMetadata
;
@Nullable
private
Surface
surface
;
@Nullable
private
Surface
surface
;
@Nullable
private
Surface
dummySurface
;
@Nullable
private
Dummy
Surface
dummySurface
;
private
boolean
haveReportedFirstFrameRenderedForCurrentSurface
;
private
boolean
haveReportedFirstFrameRenderedForCurrentSurface
;
@C
.
VideoScalingMode
private
int
scalingMode
;
@C
.
VideoScalingMode
private
int
scalingMode
;
private
boolean
renderedFirstFrameAfterReset
;
private
boolean
renderedFirstFrameAfterReset
;
...
@@ -486,6 +486,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -486,6 +486,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
}
}
}
}
@TargetApi
(
17
)
// Needed for dummySurface usage. dummySurface is always null on API level 16.
@Override
@Override
protected
void
onReset
()
{
protected
void
onReset
()
{
try
{
try
{
...
@@ -596,12 +597,18 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -596,12 +597,18 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
return
tunneling
&&
Util
.
SDK_INT
<
23
;
return
tunneling
&&
Util
.
SDK_INT
<
23
;
}
}
@TargetApi
(
17
)
// Needed for dummySurface usage. dummySurface is always null on API level 16.
@Override
@Override
protected
MediaCodecAdapter
.
Configuration
getMediaCodecConfiguration
(
protected
MediaCodecAdapter
.
Configuration
getMediaCodecConfiguration
(
MediaCodecInfo
codecInfo
,
MediaCodecInfo
codecInfo
,
Format
format
,
Format
format
,
@Nullable
MediaCrypto
crypto
,
@Nullable
MediaCrypto
crypto
,
float
codecOperatingRate
)
{
float
codecOperatingRate
)
{
if
(
dummySurface
!=
null
&&
dummySurface
.
secure
!=
codecInfo
.
secure
)
{
// We can't re-use the current DummySurface instance with the new decoder.
dummySurface
.
release
();
dummySurface
=
null
;
}
String
codecMimeType
=
codecInfo
.
codecMimeType
;
String
codecMimeType
=
codecInfo
.
codecMimeType
;
codecMaxValues
=
getCodecMaxValues
(
codecInfo
,
format
,
getStreamFormats
());
codecMaxValues
=
getCodecMaxValues
(
codecInfo
,
format
,
getStreamFormats
());
MediaFormat
mediaFormat
=
MediaFormat
mediaFormat
=
...
...
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