Skip to content

Commit

Permalink
use application context on opengl render
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Oct 14, 2024
1 parent 4dc8099 commit f0b9aa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class GlStreamInterface(private val context: Context): OnFrameAvailableListener,
surfaceManager.release()
surfaceManager.eglSetup()
surfaceManager.makeCurrent()
mainRender.initGl(context, encoderWidth, encoderHeight, encoderWidth, encoderHeight)
mainRender.initGl(context.applicationContext, encoderWidth, encoderHeight, encoderWidth, encoderHeight)
surfaceManagerPhoto.release()
surfaceManagerPhoto.eglSetup(encoderWidth, encoderHeight, surfaceManager)
running.set(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public void start() {
surfaceManager.release();
surfaceManager.eglSetup(getHolder().getSurface());
surfaceManager.makeCurrent();
mainRender.initGl(getContext(), encoderWidth, encoderHeight, encoderWidth, encoderHeight);
mainRender.initGl(getContext().getApplicationContext(), encoderWidth, encoderHeight, encoderWidth, encoderHeight);
surfaceManagerPhoto.release();
surfaceManagerPhoto.eglSetup(encoderWidth, encoderHeight, surfaceManager);
running.set(true);
Expand Down

0 comments on commit f0b9aa3

Please sign in to comment.