diff options
Diffstat (limited to 'src/photos/JfifSupport.vala')
-rw-r--r-- | src/photos/JfifSupport.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/photos/JfifSupport.vala b/src/photos/JfifSupport.vala index 12ac80a..d721441 100644 --- a/src/photos/JfifSupport.vala +++ b/src/photos/JfifSupport.vala @@ -102,11 +102,14 @@ public class JfifSniffer : GdkSniffer { base (file, options); } - public override DetectedPhotoInformation? sniff() throws Error { + public override DetectedPhotoInformation? sniff(out bool is_corrupted) throws Error { + // Rely on GdkSniffer to detect corruption + is_corrupted = false; + if (!Jpeg.is_jpeg(file)) return null; - DetectedPhotoInformation? detected = base.sniff(); + DetectedPhotoInformation? detected = base.sniff(out is_corrupted); if (detected == null) return null; |