summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-16 20:45:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-16 20:45:41 +0200
commit9db747b2a300380dd65032818155067054332dae (patch)
tree72d665b0be4eb133524bb21fb4a66a4b30dfb0cb /libavformat/os_support.c
parent5dba4cbc2f3f64b188289804216a737528ced290 (diff)
parent08e087ccf7f7ef9b4e8c55b571bc779c0bc815b0 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output. configure: Move the getaddrinfo function check into the network block configure: Remove an unused 'have' item mpeg: remove disabled code libfdk-aac: Check if cutoff value is valid network: Always use our version of gai_strerror on windows network: Undefine existing gai_strerror definitions network: Extend the fallback gai_strerror implementation to handle more error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index a5f51e5845..1024704579 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -240,18 +240,28 @@ int ff_getnameinfo(const struct sockaddr *sa, int salen,
return 0;
}
+#endif /* !HAVE_GETADDRINFO */
+#if !HAVE_GETADDRINFO || HAVE_WINSOCK2_H
const char *ff_gai_strerror(int ecode)
{
switch(ecode) {
+ case EAI_AGAIN : return "Temporary failure in name resolution";
+ case EAI_BADFLAGS: return "Invalid flags for ai_flags";
case EAI_FAIL : return "A non-recoverable error occurred";
case EAI_FAMILY : return "The address family was not recognized or the address length was invalid for the specified family";
+ case EAI_MEMORY : return "Memory allocation failure";
+#if EAI_NODATA != EAI_NONAME
+ case EAI_NODATA : return "No address associated with hostname";
+#endif
case EAI_NONAME : return "The name does not resolve for the supplied parameters";
+ case EAI_SERVICE: return "servname not supported for ai_socktype";
+ case EAI_SOCKTYPE: return "ai_socktype not supported";
}
return "Unknown error";
}
-#endif
+#endif /* !HAVE_GETADDRINFO || HAVE_WINSOCK2_H */
int ff_socket_nonblock(int socket, int enable)
{