avfoundation: update to use AVCodecParameters