From 2e74475f5b91a9092d3243931e362b552d92af19 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 13 Sep 2011 11:21:31 +0200 Subject: [PATCH] android: fix video rendering bug when changing resolution during call --- src/org/linphone/core/AndroidVideoWindowImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/core/AndroidVideoWindowImpl.java b/src/org/linphone/core/AndroidVideoWindowImpl.java index 2fd27b424..4fc213f5f 100644 --- a/src/org/linphone/core/AndroidVideoWindowImpl.java +++ b/src/org/linphone/core/AndroidVideoWindowImpl.java @@ -120,15 +120,20 @@ public class AndroidVideoWindowImpl { private static class Renderer implements GLSurfaceView.Renderer { int ptr; boolean initPending; - int width, height; + int width=-1, height=-1; public Renderer() { - ptr = 0; + ptr = 0; initPending = false; } public void setOpenGLESDisplay(int 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) {