Record: fix for ffmpeg deadlock 

The subprocess running ffmpeg sometimes hangs, probably because of output being generated but not consumed.