BufferOverflowException fix

camera2
thegobot 6 years ago committed by GitHub
parent cf65d9c16a
commit a5415b2875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,6 +101,7 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
mSurfaceWidth = width;
mSurfaceHeight = height;
magicFilter.onDisplaySizeChanged(width, height);
magicFilter.onInputSizeChanged(mPreviewWidth, mPreviewHeight);
mOutputAspectRatio = width > height ? (float) width / height : (float) height / width;
float aspectRatio = mOutputAspectRatio / mInputAspectRatio;
@ -257,6 +258,7 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
public void disableEncoding() {
mIsEncoding = false;
mGLIntBufferCache.clear();
mGLPreviewBuffer.clear();
if (worker != null) {
worker.interrupt();

Loading…
Cancel
Save