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

EGL 渲染视频 报空指针 麻烦看一下 这是日志 #5

Open
JacksonNing opened this issue Dec 29, 2019 · 1 comment
Open

EGL 渲染视频 报空指针 麻烦看一下 这是日志 #5

JacksonNing opened this issue Dec 29, 2019 · 1 comment

Comments

@JacksonNing
Copy link

2019-12-30 01:46:47.765 24449-24449/com.cxp.learningvideo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cxp.learningvideo, PID: 24449
java.lang.NullPointerException: Attempt to read from null array
at android.opengl.Matrix.scaleM(Matrix.java:472)
at com.cxp.learningvideo.opengl.drawer.VideoDrawer.scale(VideoDrawer.kt:296)
at com.cxp.learningvideo.EGLPlayerActivity$initSecondVideo$2.run(EGLPlayerActivity.kt:60)
at android.os.Handler.handleCallback(Handler.java:792)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6701)
at java.lang.reflect.Method.invoke(Native ### Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246)

@ChenLittlePing
Copy link
Owner

这个问题是因为drawer.scale(0.5f, 0.5f)的时候,VideoDrawer还没有初始化完毕导致里面的矩阵变量没有初始化,所以空指针了。你可以先把drawer.scale(0.5f, 0.5f)去掉,或者延时长一点。我找时间修复一下这个问题。

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