Merge pull request #691 from thegobot/master

BufferOverflowException  fix
camera2
Leo Ma 6 years ago committed by GitHub
commit 71d2c75484
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