Add medium latency mode
Make new lowlatency encoding mode more compliant.
Merge branch 'midlatency'
Silence invalid pointer warnings