[FFmpeg-devel] [PATCH] workaround for IOS9 getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve port number.
Dave Yeo
daveryeo at telus.net
Sun Nov 6 19:31:09 EET 2016
On 11/06/16 04:34 AM, Michael Niedermayer wrote:
>> src/libavformat/tcp.c: In function 'tcp_open':
>> >src/libavformat/tcp.c:128:25: error: dereferencing pointer to
>> >incomplete type
>> > if (!sockaddr_v6->sin6_port){
>> > ^
>> >src/libavformat/tcp.c:129:24: error: dereferencing pointer to
>> >incomplete type
>> > sockaddr_v6->sin6_port = htons(port);
>> > ^
>> >make: *** [libavformat/tcp.o] Error 1
>> >make: *** Waiting for unfinished jobs....
> does this fix it: ?
>
> diff --git a/libavformat/tcp.c b/libavformat/tcp.c
> index fd10a56..25abafc 100644
> --- a/libavformat/tcp.c
> +++ b/libavformat/tcp.c
> @@ -122,6 +122,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
> cur_ai = ai;
>
> restart:
> +#if HAVE_STRUCT_SOCKADDR_IN6
> // workaround for IOS9 getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve port number.
> if (cur_ai->ai_family == AF_INET6){
> struct sockaddr_in6 * sockaddr_v6 = (struct sockaddr_in6 *)cur_ai->ai_addr;
> @@ -129,6 +130,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
> sockaddr_v6->sin6_port = htons(port);
> }
> }
> +#endif
>
> fd = ff_socket(cur_ai->ai_family,
> cur_ai->ai_socktype,
Yes, that seems to fix it.
Thanks,
Dave
More information about the ffmpeg-devel
mailing list