diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 17a90c84a..79e8980e9 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -861,7 +861,7 @@ public class FileBackend { MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever(); mediaMetadataRetriever.setDataSource(mXmppConnectionService, uri); return Integer.parseInt(mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { return 0; } } @@ -940,7 +940,7 @@ public class FileBackend { try { metadataRetriever.setDataSource(file.getAbsolutePath()); } catch (Exception e) { - throw new NotAVideoFile(); + throw new NotAVideoFile(e); } return getVideoDimensions(metadataRetriever); } @@ -1012,7 +1012,13 @@ public class FileBackend { } private static class NotAVideoFile extends Exception { + public NotAVideoFile(Throwable t) { + super(t); + } + public NotAVideoFile() { + super(); + } } public class FileCopyException extends Exception { |