@ -163,6 +163,9 @@ abstract class MediaEncoder {
mMediaCodec.stop();
mMediaCodec.release();
mMediaCodec = null;
mOutputBufferPool.clear();
mOutputBufferPool = null;
mBuffers = null;
onRelease();
}
@ -134,6 +134,7 @@ class TextureMediaEncoder extends VideoMediaEncoder<TextureMediaEncoder.Config>
@Override
void onRelease() {
mFramePool.clear();
if (mWindow != null) {
mWindow.release();
mWindow = null;