diff --git a/src/createFFmpeg.js b/src/createFFmpeg.js index cbf5d9f..ad9bf3d 100644 --- a/src/createFFmpeg.js +++ b/src/createFFmpeg.js @@ -180,12 +180,14 @@ module.exports = (_options = {}) => { running = false; try { Core.exit(1); - } catch(e) { - console.log('catch core exit error', e); + } catch (e) { + log(e.message); + } finally { + Core = null; + ffmpeg = null; + runResolve = null; } - Core = null; - ffmpeg = null; - runResolve = null; + } };