Only use av_iformat_next and av_oformat_next when using FFmpeg < 4.0, see:
https://github.com/FFmpeg/FFmpeg/blob/ebc3d04b8df4e11b1343090fed1014832d5cf46d/doc/APIchanges#L92
We can also stop detecting and stubbing of these function which have been present since at least FFmpeg 2.0:
- avformat_alloc_output_context2
- avformat_close_input