Commit 13bcc006 by olly Committed by Oliver Woodman

Don't release a surface until we've stopped using it

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164596062
parent c1827b10
......@@ -749,12 +749,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment