[FFmpeg-devel] [PATCH v4 1/5] Add documentation for ff_neterrno()

Andrew Sayers ffmpeg-devel at pileofstuff.org
Thu May 16 12:33:34 EEST 2024


---
 libavformat/network.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavformat/network.h b/libavformat/network.h
index ca214087fc..728c20c9bb 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -57,6 +57,11 @@
 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
 
+/*
+ * @brief AVERROR for the latest network function
+ * @return platform-specific AVERROR value
+ * @note Error is based on WSAGetLastError() (Windows) or `errno` (otherwise)
+ */
 int ff_neterrno(void);
 #else
 #include <sys/types.h>
@@ -65,6 +70,11 @@ int ff_neterrno(void);
 #include <netinet/tcp.h>
 #include <netdb.h>
 
+/*
+ * @brief AVERROR for the latest network function
+ * @return platform-specific AVERROR value
+ * @note Error is based on WSAGetLastError() (Windows) or `errno` (otherwise)
+ */
 #define ff_neterrno() AVERROR(errno)
 #endif /* HAVE_WINSOCK2_H */
 
-- 
2.43.0



More information about the ffmpeg-devel mailing list