libffabi/src/ffabi.c:214:9: error: implicit declaration of function ‘avcodec_close’; did you mean ‘avcodec_license’? [-Wimplicit-function-declaration]
214 | avcodec_close(ctx->avctx);
| ^~~~~~~~~~~~~
libffabi/src/ffabi.c:377:25: error: ‘FF_PROFILE_UNKNOWN’ undeclared (first use in this function); did you mean ‘FFM_PROFILE_UNKNOWN’?
377 | info->profile : FF_PROFILE_UNKNOWN;
| ^~~~~~~~~~~~~~~~~~
I then went back to an older copy of ffmpeg from 2024-10-04 and I was able to build makemkv-oss-1.18.1 without any problems.
Apparently, ffmpeg has changed its API recently, and makemkv-oss-1.18.1 cannot build using the new API.
I looked at the ffmpeg git repo, and found that avcodec_close() was deprecated, and now has been removed. Please see commit 0d48da2db in the ffmpeg source git:
* @deprecated Do not use this function. Use avcodec_free_context() to destroy a
* codec context (either open or closed). Opening and closing a codec context
* multiple times is not supported anymore -- use multiple codec contexts
* instead.
Regarding FF_PROFILE_UNKNOWN, I found commit 822432769 which removes it:
These were good hints. The following patch should make ffabi.c from makemkv-oss-1.18.1 compile against libavcodec.so.62, if anyone else is trying to work that out. Fair warning, no idea if this breaks compat with earlier versions of libavcodec. Also worth saying I do not generate patches with any frequency, so if this doesn't apply properly the changes are easy to make by hand.
I was experiencing libc/pthread segfaults originating in ffm_mlp_read_syncframe which is part of the patch. It compiles cleanly, but looking harder at avcodec_free_context, it takes a pointer to a pointer. Amending the patch to...