aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-08-05 20:19:28 +0800
committerJun Zhao <jun.zhao@intel.com>2018-08-18 16:16:11 +0800
commit0a8ff1d8bb07e8ffbbe5dbdc3885bcd6113188e6 (patch)
treea063da0fa37fe4927c25f4db74cf5809c921eb7f /libavformat/network.c
parentd428ef0ea58417456e4a84d1ed47c3935a6e0cfb (diff)
downloadffmpeg-0a8ff1d8bb07e8ffbbe5dbdc3885bcd6113188e6.tar.gz
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;
}