Skip to content

Commit

Permalink
update java interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Enieste authored Apr 22, 2023
1 parent 4fbc71c commit fc01020
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions android/src/main/java/com/shahenlibrary/Trimmer/Trimmer.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ public static void getPreviewImages(String path, Promise promise, ReactApplicati

promise.resolve(event);
} finally {
retriever.release();
try {
retriever.release();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down Expand Up @@ -446,7 +450,11 @@ private static ReadableMap getVideoRequiredMetadata(String source, Context ctx)
videoMetadata.putInt("bitrate", bitrate);
return videoMetadata;
} finally {
retriever.release();
try {
retriever.release();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down Expand Up @@ -566,7 +574,11 @@ static void getPreviewImageAtPosition(String source, double sec, String format,
// NOTE: FIX ROTATED BITMAP
orientation = Integer.parseInt(metadataRetriever.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION));
} finally {
metadataRetriever.release();
try {
metadataRetriever.release();
} catch (Exception e) {
e.printStackTrace();
}
}

if ( orientation != 0 ) {
Expand Down Expand Up @@ -667,7 +679,11 @@ static void getTrimmerPreviewImages(String source, double startTime, double endT

promise.resolve(event);
} finally {
retriever.release();
try {
retriever.release();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down

0 comments on commit fc01020

Please sign in to comment.