Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-08-05 15:19:28 +0300
committerJun Zhao <jun.zhao@intel.com>2018-08-18 11:16:11 +0300
commit0a8ff1d8bb07e8ffbbe5dbdc3885bcd6113188e6 (patch)
treea063da0fa37fe4927c25f4db74cf5809c921eb7f /libavformat/network.c
parentd428ef0ea58417456e4a84d1ed47c3935a6e0cfb (diff)
lavf/network: check return value of setsockopt.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index 21c836a0aa..4bae7e2e44 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -194,8 +194,11 @@ int ff_socket(int af, int type, int proto)
#endif
}
#ifdef SO_NOSIGPIPE
- if (fd != -1)
- setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int));
+ if (fd != -1) {
+ if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int))) {
+ av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_NOSIGPIPE) failed\n");
+ }
+ }
#endif
return fd;
}