implementation of encoder with a test that doesn't crash, but that leaks memory and makes a corrupted video vile
attempt to fix encoder leaks/memcheck errors; still a corrupted file though