|
|
|
@ -136,7 +136,12 @@ class SnapshotVideoRecorder extends VideoRecorder implements GlCameraPreview.Ren |
|
|
|
|
mOverlaySurfaceTexture.updateTexImage(); |
|
|
|
|
mOverlaySurfaceTexture.getTransformMatrix(textureFrame.overlayTransform); |
|
|
|
|
} |
|
|
|
|
mEncoderEngine.notify(TextureMediaEncoder.FRAME_EVENT, textureFrame); |
|
|
|
|
// Sometimes when the video ends an Exception is thrown saying that nofify was called on
|
|
|
|
|
// a null object. This might be highlighting a bigger problem, but checking for null
|
|
|
|
|
// fixes the Exception.
|
|
|
|
|
if (mEncoderEngine != null) { |
|
|
|
|
mEncoderEngine.notify(TextureMediaEncoder.FRAME_EVENT, textureFrame); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mCurrentState == STATE_RECORDING && mDesiredState == STATE_NOT_RECORDING) { |
|
|
|
|