Awesome the second workaround seem a better way i will try it.

________________________________
发件人: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> 代表 Michael Niedermayer 
<mich...@niedermayer.cc>
发送时间: 2016年8月24日 8:11
收件人: FFmpeg development discussions and patches
主题: Re: [FFmpeg-devel] 答复: [PATCH] IOS-IPv6-only-network-use-hardcode-IPv4-fix

On Wed, Aug 24, 2016 at 07:15:29AM +0000, liu jc wrote:
> It is not a ios hack,  It compatible with any system that in accordance with 
> the POSIX standards. The second parameter of function getaddrinfo  can accept 
> the port name or a service name. If you give a service name to it it will 
> translate it to a  standard port number.

POSIX says this:

http://pubs.opengroup.org/onlinepubs/009695399/functions/freeaddrinfo.html

"If servname is null, the call shall return network-level addresses for the 
specified nodename. If servname is not null, it is a null-terminated character 
string identifying the requested service. This can be either a descriptive name 
or a numeric representation suitable for use with the address family or 
families. If the specified address family is AF_INET, [IP6] [Option Start]  
AF_INET6, [Option End] or AF_UNSPEC, the service can be specified as a string 
specifying a decimal port number."

so port numbers are required to be supported by POSIX
some IOS version fails with that,
that IOS version is buggy, the bug in fact seems known and has been
fixed already IIUC
also see
http://stackoverflow.com/questions/37386161/service-port-is-missed-when-using-getaddrinfo-to-convert-ipv4-addr-to-ipv6-addr

also macromedia-fcs is not in my /etc/services so your patch
would break POSIX systems

If you wish to workaround a IOS bug i dont mind but that has to be
clean and work.
your patch half works on IOS (only 2 port numbers supported) and half
breaks POSIX systems


[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to