ffmpeg: avoid endlessly reading from one input while another is unavailable