Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while switching camera from rear camera to front camera in Android 8 only #145

Open
ParthP-7 opened this issue Mar 1, 2021 · 1 comment

Comments

@ParthP-7
Copy link

ParthP-7 commented Mar 1, 2021

2021-03-01 17:53:37.902 13154-13678/com.digiflixtv.app E/AndroidRuntime: FATAL EXCEPTION: CameraRenderer
Process: com.digiflixtv.app, PID: 13154
java.lang.RuntimeException: Error during updateTexImage (see logcat for details)
at android.graphics.SurfaceTexture.nativeUpdateTexImage(Native Method)
at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:243)
at com.cgfay.camera.render.CameraRenderer.updateSurfaceTexture(CameraRenderer.java:409)
at com.cgfay.camera.render.CameraRenderer.onDrawFrame(CameraRenderer.java:351)
at com.cgfay.camera.render.CameraRenderHandler.handleMessage(CameraRenderHandler.java:73)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:192)
at com.cgfay.camera.render.CameraRenderer.run(CameraRenderer.java:498)

@ParthP-7 ParthP-7 changed the title Issue while switching camera from rear camera to front camera Issue while switching camera from rear camera to front camera in Android 8 only Mar 1, 2021
@CainKernel
Copy link
Owner

Ididn‘t encounter this problem. maybe a compatibility exception. while switching camera, EGLContext may have been changed to another one by System. to fix it, you can try-catch this exception and don't draw this image texture when it occurs. if EGLContext is valid, then need to reinit and rebind surfaceTexture. if it still occurs, considering if memory leaks in OpenGL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants