If you actually work with ffmpeg, it's rather quite impressive how pluggable the architecture is. The codecs have huge amount of quirks and disagreements about basics (what is a "frame" in audio, subtitle, and video worlds?) and even their environment (passing frames around software and hardware coders is way different).

That fact that you can (almost) freely mix and match processing between such different worlds is quite an achievement and libav (IMO) is decently well designed to allow that.