Here's
test3.
The main noticable change is the framerate "correction". It should now more reliably pick common framerates if the input is close to one.
Previously it would "correct" framerates to 30001/1001, 25020/1001 or worse.
Test it and report your findings.