avformat/mpegts: Factorize version checking code out