newbuild: amr: fix massive memory leak in AMR encoder init