encoder-stream: fix global `done` variable leak
v1.1.1