rubygarage / media-watermark

GPU/CPU-based iOS Watermark Library for Image and Video Overlay
https://rubygarage.org/
MIT License
217 stars 63 forks source link

Completion called when temp file doesn't exist #2

Closed klabusta closed 7 years ago

klabusta commented 7 years ago

in MediaVideoProcessor

do { try FileManager.default.removeItem(at: url) } catch { completion(MediaProcessResult(processedUrl: nil, image: nil), error) } runs into the catch block when the temp file doesn't exist. This is every time you are processing the first time (i.e. you have clean new install of your app). This should not try to remove the file if it doesn't exist (which needs to be checked first).

Btw, I'd also recommend to stop processing on completion.

jowkame commented 7 years ago

Thanks, will add update.