catch exception when trying to get video preview of pgp encrypted file
This commit is contained in:
parent
0e96e0a796
commit
3c48b14448
|
@ -728,7 +728,11 @@ public class FileBackend {
|
|||
|
||||
private Dimensions getVideoDimensions(File file) throws NotAVideoFile {
|
||||
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue