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
ab416f41
authored
Jul 22, 2021
by
olly
Committed by
kim-vde
Jul 22, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Release ownedSurface before stopping the player on timeout
PiperOrigin-RevId: 386206960
parent
fe5a7fcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
ab416f41
...
...
@@ -1988,6 +1988,7 @@ public class SimpleExoPlayer extends BasePlayer
.
send
());
}
}
boolean
messageDeliveryTimedOut
=
false
;
if
(
this
.
videoOutput
!=
null
&&
this
.
videoOutput
!=
videoOutput
)
{
// We're replacing an output. Block to ensure that this output will not be accessed by the
// renderers after this method returns.
...
...
@@ -1998,12 +1999,7 @@ public class SimpleExoPlayer extends BasePlayer
}
catch
(
InterruptedException
e
)
{
Thread
.
currentThread
().
interrupt
();
}
catch
(
TimeoutException
e
)
{
// One of the renderers timed out releasing its resources.
player
.
stop
(
/* reset= */
false
,
ExoPlaybackException
.
createForUnexpected
(
new
ExoTimeoutException
(
ExoTimeoutException
.
TIMEOUT_OPERATION_DETACH_SURFACE
),
PlaybackException
.
ERROR_CODE_TIMEOUT
));
messageDeliveryTimedOut
=
true
;
}
if
(
this
.
videoOutput
==
ownedSurface
)
{
// We're replacing a surface that we are responsible for releasing.
...
...
@@ -2012,6 +2008,13 @@ public class SimpleExoPlayer extends BasePlayer
}
}
this
.
videoOutput
=
videoOutput
;
if
(
messageDeliveryTimedOut
)
{
player
.
stop
(
/* reset= */
false
,
ExoPlaybackException
.
createForUnexpected
(
new
ExoTimeoutException
(
ExoTimeoutException
.
TIMEOUT_OPERATION_DETACH_SURFACE
),
PlaybackException
.
ERROR_CODE_TIMEOUT
));
}
}
/**
...
...
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