schaermu/node-fluent-ffmpeg — pull request #185 by njoyard (2014-01-08 07:05:47+00:00)
Title: (test) Fix writeToStream writing to stream after closing it

(this is just a test pull request for now)

writeToStream closes the output stream when the ffmpeg process terminates, but 'data' events on the process stdout stream can still happen after that.

This patch fixes this problem by closing the stream on the stdout 'end' event.