Don't crash on failed EGL makeCurrent attempts
EglRenderer.renderFrameOnRenderThread: suppress GLException thrown by failed EglBase14Impl::makeCurrent invocation. Bug: webrtc:365957543 Change-Id: I947ad7d39ce01e3bbe9bc767d6427e4271f0c0cd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361020 Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43027}
This commit is contained in:
parent
ce69c73ef4
commit
de6225b2e2
@ -14,6 +14,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import android.graphics.SurfaceTexture;
|
import android.graphics.SurfaceTexture;
|
||||||
import android.opengl.GLES20;
|
import android.opengl.GLES20;
|
||||||
|
import android.opengl.GLException;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
import androidx.annotation.GuardedBy;
|
import androidx.annotation.GuardedBy;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@ -686,7 +687,13 @@ public class EglRenderer implements VideoSink {
|
|||||||
frame.release();
|
frame.release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
eglBase.makeCurrent();
|
eglBase.makeCurrent();
|
||||||
|
} catch (GLException e) {
|
||||||
|
logE("Error while eglMakeCurrent", e);
|
||||||
|
frame.release();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if fps reduction is active.
|
// Check if fps reduction is active.
|
||||||
final boolean shouldRenderFrame;
|
final boolean shouldRenderFrame;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user