diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-07-31 22:31:47 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-02 21:43:34 +0200 |
commit | 4564bd291edffc5ba856c582bcc117200e21a8bc (patch) | |
tree | 03993f178f6652ab7170fcc279cc149125a2caef /src | |
parent | 7bde2bbb07eed59b56c9c57c1c81cb1e7b811404 (diff) |
catch exception when trying to get video preview of pgp encrypted file
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 8a5a9af35..51f7ae3c2 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -754,7 +754,11 @@ public class FileBackend { private Dimensions getVideoDimensions(File file) throws NotAVideoFile { MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever(); - metadataRetriever.setDataSource(file.getAbsolutePath()); + try { + metadataRetriever.setDataSource(file.getAbsolutePath()); + } catch (Exception e) { + throw new NotAVideoFile(); + } String hasVideo = metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_HAS_VIDEO); if (hasVideo == null) { throw new NotAVideoFile(); |