android: fix video rendering bug when changing resolution during call
This commit is contained in:
parent
6c24b1de61
commit
2e74475f5b
1 changed files with 7 additions and 2 deletions
|
@ -120,7 +120,7 @@ public class AndroidVideoWindowImpl {
|
||||||
private static class Renderer implements GLSurfaceView.Renderer {
|
private static class Renderer implements GLSurfaceView.Renderer {
|
||||||
int ptr;
|
int ptr;
|
||||||
boolean initPending;
|
boolean initPending;
|
||||||
int width, height;
|
int width=-1, height=-1;
|
||||||
|
|
||||||
public Renderer() {
|
public Renderer() {
|
||||||
ptr = 0;
|
ptr = 0;
|
||||||
|
@ -129,6 +129,11 @@ public class AndroidVideoWindowImpl {
|
||||||
|
|
||||||
public void setOpenGLESDisplay(int ptr) {
|
public void setOpenGLESDisplay(int ptr) {
|
||||||
this.ptr = ptr;
|
this.ptr = ptr;
|
||||||
|
// if dimension are set, we are recreating MS2 graph without
|
||||||
|
// recreating the surface => need to force init
|
||||||
|
if (width > 0 && height > 0) {
|
||||||
|
initPending = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDrawFrame(GL10 gl) {
|
public void onDrawFrame(GL10 gl) {
|
||||||
|
|
Loading…
Reference in a new issue