"running" is never set to "false"
jumpjack opened this issue · comments
jumpjack commented
The only method setting "running" variable to "false" (after "render()" sets it to "true") is "abort()"; I think render() should set running to false once finished.
mrrs878 commented
I did this: call gif.abort() in the callback function of gif.on("finished") and then running is reset to false
Andrea Doimo commented
To properly launch multiple time the gif rendering without issues, I had to do the following:
gif.abort(); gif.frames = []; delete gif.imageParts; delete gif.finishedFrames; delete gif.nextFrame;
mrrs878 commented
Yes, I found that there would be problems when rendering a new gif after calling gif.abort()
, so I replaced gif.abort()
with
// ...
gif.running = false;
gif.frames = [];
// ...