Swap ffms and lavf order of use
Set thread execution state

prevent Windows from falling into standby
patch from LoRd_MuldeR