Example #1: I have seen her talking to John.
Example #2: I have seen her talk to John.
In example #1, it means you have seen them while they were “talking” i.e, they were still talking while you left the scene.
In example #2, it means you were you saw them both doing the talk from end to end (starting to end). You left only after they left the place.
Picture the above two scenarios from the standpoint of a private detective. If you were paid to stalk them, would you leave the scene before they did? If you had to leave, you can only say, I had to leave the place while they were still talking.
Whether you want to use “seen them talk” or “seen them talking” depends entirely on how much of the action you have witnessed.
Here are some more examples:
I saw the pin drop (meaning you actually saw then the pin dropped from your hand until it hit the floor since technically, it takes barely a sec for the action to finish)
I saw her cross the road yesterday. (You saw her cross the road from point A to B, and not like you turned a blind eye while she was still in the middle of a 20 feet wide road.
I saw her riding the bike yesterday (You just saw her riding the bike and she went way while still seated in the bike. You couldn’t follow her to see if she got off the bike because it was none of your business)