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
Make sure the SurfaceView or associated SurfaceHolder has a valid Surface #1320
Comments
Hello, This is becuase you are using a surface that is not ready to use. Make sure that you are not calling startPreview or startStreaming before of surfaceChanged callback.
This could be related with this method. Make sure it is not called before surfaceChanged |
Solved by using this -> openGlView.getHolder().getSurface().isValid()
|
However the issue not resolves in play store production release, even I didn't use any proguard |
Closing as inactive. Reopen issue if needed |
Issue still presents, still hasn't solved yet it will be better opened. |
Hello, Ok, we can try refactor a bit the code. I think that the problem is related with startPreview in a wrong moment. You can try remove startPreview from this line:
You can call prepareEncoders but startPreview only should be called in onSurfaceChange and in onSurfaceDestroyed. if (!rtmpCamera1.isOnPreview()) rtmpCamera1.startPreview(); if (rtmpCamera1.isOnPreview()) rtmpCamera1.stopPreview(); |
My app crashes when try to open OpenGlRtmpActivity
My updated OpenGlRtmpActivity
The text was updated successfully, but these errors were encountered: