Part of T73586
I haven't tested this thoroughly so things might be broken.
However, our automated tests pass, so that's something :)
Perhaps we should also cleanup more of the LIBAVCODEC_VERSION_MAJOR checks and bump our supported minimum ffmpeg version?
For the check I removed in this patch I noticed that the function avcodec_encode_audio is competently removed in the recent 4.2.x and 4.3.x versions.
In addition to this, seems like most checks are for version from 2012-2014, so I think it should be safe to clean these up.
I want to ask first before I do it though as that was not part of the code quality task.
Note that this is not the final version of this patch.
There are a few temporary changes and TODOs.
But I wanted to check if what I have done so far is ok and doesn't break any specific code path.
