Added explicit casts.
Always include files as 'extern "C"'.
Don't use internal "ff_get_buffer", fixed compilation of codec registration using MSVC.