Added HTSMUXautodetect() final code