JYangkai / MediaDemo

音视频采集、编码、解码、封装、解封装,OpenGLES渲染图像、视频,滤镜、特效、转场特效
MIT License
115 stars 32 forks source link

java.lang.IllegalStateException: Unable to update texture contents (see logcat for details) #1

Open CFD08Joshua opened 2 years ago

CFD08Joshua commented 2 years ago

我將 video view 加入到 adapter 搭配 ViewPager 達到左右橫滑效果,但返回上部影片時,都會報錯

E/: [SurfaceTexture-0-31427-1] checkAndUpdateEglState: invalid current EGLContext E/BufferQueueProducer: SurfaceTexture-0-31427-4 disconnect: not connected (req=1) W/libEGL: EGLNativeWindowType 0x7e00b51010 disconnect failed

--------- beginning of crash

E/AndroidRuntime: FATAL EXCEPTION: GLThread 7484 Process: , PID: 31427 java.lang.IllegalStateException: Unable to update texture contents (see logcat for details) at android.graphics.SurfaceTexture.nativeUpdateTexImage(Native Method) at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:248) at com.yk.media.opengles.render.base.BaseOesRender.onDrawPre(BaseOesRender.java:99) at com.yk.media.opengles.render.base.BaseRender.onDraw(BaseRender.java:188) at com.yk.media.opengles.render.base.BaseOesRender.onDrawSelf(BaseOesRender.java:139) at com.yk.media.opengles.render.OesRender.onDraw(OesRender.java:53) at com.yk.media.opengles.view.base.EGLTextureView$GLThread.guardedRun(EGLTextureView.java:1455) at com.yk.media.opengles.view.base.EGLTextureView$GLThread.run(EGLTextureView.java:1165)

bhavin-qfonapp commented 2 years ago

Found any solution?