mirror of
https://github.com/samsonjs/media.git
synced 2026-04-13 12:35:48 +00:00
Don't release a surface until we've stopped using it
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=164596062
This commit is contained in:
parent
b8c6ed6701
commit
026ac1d69b
1 changed files with 3 additions and 3 deletions
|
|
@ -762,12 +762,12 @@ public class SimpleExoPlayer implements ExoPlayer {
|
|||
}
|
||||
}
|
||||
if (this.surface != null && this.surface != surface) {
|
||||
// If we created this surface, we are responsible for releasing it.
|
||||
// We're replacing a surface. Block to ensure that it's not accessed after the method returns.
|
||||
player.blockingSendMessages(messages);
|
||||
// If we created the previous surface, we are responsible for releasing it.
|
||||
if (this.ownsSurface) {
|
||||
this.surface.release();
|
||||
}
|
||||
// We're replacing a surface. Block to ensure that it's not accessed after the method returns.
|
||||
player.blockingSendMessages(messages);
|
||||
} else {
|
||||
player.sendMessages(messages);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue