avformat/tee: Support arbitrary number of slaves