Skip to content

Commit f335058

Browse files
committed
smoother video, correct timezone
1 parent 6e217c4 commit f335058

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Pod/MRZParser.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ open class MRZParser : NSObject{
3939
let dateStringFormatter = DateFormatter()
4040
dateStringFormatter.dateFormat = "YYMMdd"
4141
dateStringFormatter.locale = Locale(identifier: "en_US_POSIX")
42+
dateStringFormatter.timeZone = TimeZone(abbreviation: "GMT+0:00")
4243
let d = dateStringFormatter.date(from: value)
4344
if d != nil {
4445
date = Date(timeInterval: 0, since: d!)

Pod/PassportScannerController.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,11 @@ open class PassportScannerController: UIViewController, MGTesseractDelegate {
265265
self.pictureOutput.encodedImageFormat = .png
266266
self.pictureOutput.onlyCaptureNextFrame = true
267267
self.pictureOutput.imageAvailableCallback = { sourceImage in
268-
if self.processImage(sourceImage: sourceImage) { return }
269-
// Not successful, start another scan
270-
self.scanning()
268+
DispatchQueue.global().async() {
269+
if self.processImage(sourceImage: sourceImage) { return }
270+
// Not successful, start another scan
271+
self.scanning()
272+
}
271273
}
272274
self.crop --> self.pictureOutput
273275
}

0 commit comments

Comments
 (0)