Skip to content
Snippets Groups Projects
Commit 3765273c authored by Leo Ma's avatar Leo Ma
Browse files

Replace ByteBuffer.allocate with allocateDirect


Signed-off-by: default avatarLeo Ma <begeekmyfriend@gmail.com>
parent 9f5673a0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -148,7 +148,7 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
}
mCamera.getParameters().setPreviewSize(mPreviewWidth, mPreviewHeight);
 
mGLPreviewBuffer = ByteBuffer.allocate(mPreviewWidth * mPreviewHeight * 4);
mGLPreviewBuffer = ByteBuffer.allocateDirect(mPreviewWidth * mPreviewHeight * 4);
mInputAspectRatio = mPreviewWidth > mPreviewHeight ?
(float) mPreviewWidth / mPreviewHeight : (float) mPreviewHeight / mPreviewWidth;
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment