From 4bd574efbc22803ac0372db56555b5fbef2d0acb Mon Sep 17 00:00:00 2001 From: Jose Granja Martinez Date: Mon, 12 Jun 2017 21:19:27 +0200 Subject: [PATCH] releasing MediaMetadataRetriever --- src/android/VideoEditor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/VideoEditor.java b/src/android/VideoEditor.java index 4beba4d..88023dd 100644 --- a/src/android/VideoEditor.java +++ b/src/android/VideoEditor.java @@ -362,7 +362,7 @@ public void run() { outStream = new FileOutputStream(outputFile); bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outStream); - + mmr.release(); callback.success(outputFilePath); } catch (Throwable e) { @@ -451,7 +451,7 @@ private void getVideoInfo(JSONArray args) throws JSONException, IOException { double duration = Double.parseDouble(mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)) / 1000.0; long bitrate = Long.parseLong(mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_BITRATE)); - + mmr.release(); JSONObject response = new JSONObject(); response.put("width", videoWidth); response.put("height", videoHeight);