FFmpeg/FFmpeg — pull request #42 by lemonlinger (2013-10-26 15:25:46+00:00)
Title: Fix a bug:When a client is behind NAT, it cannot receive any packets sent from ffserver via udp.

When ffserver sends rtp packets via udp, the udp ports of client is got from header of SETUP request.But if the client is behind NAT, the client ports got from header of SETUP request are not ones mapped by NAT but client's private ports. In this case, the client can't get any packets because ffserver still sends that to client's private ports.

In fact, clients(such as vlc, video player on android) send two udp packets to ffserver for punching a hole on NAT after getting reply of SETUP request. So, we should receive the two udp packets, retrieve real client ports mapped by NAT, and send packets to the client via the real ports.