summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ImageManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/ImageManager.java')
-rwxr-xr-xsrc/com/android/camera/ImageManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/ImageManager.java b/src/com/android/camera/ImageManager.java
index 4ceedb8..4354e92 100755
--- a/src/com/android/camera/ImageManager.java
+++ b/src/com/android/camera/ImageManager.java
@@ -1042,8 +1042,14 @@ public class ImageManager {
retriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);
retriever.setDataSource(filePath);
bitmap = retriever.captureFrame();
+ } catch (RuntimeException ex) {
+ // Assume this is a corrupt video file.
} finally {
- retriever.release();
+ try {
+ retriever.release();
+ } catch (RuntimeException ex) {
+ // Ignore failures while cleaning up.
+ }
}
return bitmap;
}