Refactored TextureBuffer image loading and FFmpeg C code

Fixed memory leak
Added more FFmpeg C files