Record: fix for ffmpeg deadlock 

The subprocess running ffmpeg sometimes hangs, probably because of output being generated but not consumed.
Merge pull request #1 from barthanssens/master

Record: fix for ffmpeg deadlock