Skip to content

Commit

Permalink
Merge pull request #1 from parsable-bratislavbatinic/patch
Browse files Browse the repository at this point in the history
Update CreateThumbnailModule.java
  • Loading branch information
parsable-bratislavbatinic authored Sep 12, 2023
2 parents 529ae3d + a3c0067 commit bfea654
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ private static Bitmap getBitmapAtTime(Context context, String filePath, int time
}

Bitmap image = retriever.getFrameAtTime(time * 1000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);
retriever.release();
try {
retriever.release();
} catch (Exception e) { // Catching Exception class as it's unclear what specific exception you're facing
// Handle or log the exception here
e.printStackTrace();
}
if (image == null) {
throw new IllegalStateException("File doesn't exist or not supported");
}
Expand Down

0 comments on commit bfea654

Please sign in to comment.