ffmpeg: replace messy duplicated tag compatibility functions by more generic solution.