Re-#define avcodec_free_frame for old versions
Add freeimage dependency to PKGBUILD
Fix remaining memory leaks