lave: restore relevant code in engine.c
refactor ffplay.c