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 { | 	private Dimensions getVideoDimensions(File file) throws NotAVideoFile { | ||||||
| 		MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever(); | 		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); | 		String hasVideo = metadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_HAS_VIDEO); | ||||||
| 		if (hasVideo == null) { | 		if (hasVideo == null) { | ||||||
| 			throw new NotAVideoFile(); | 			throw new NotAVideoFile(); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch