summaryrefslogtreecommitdiffstats
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
parentd428ef0ea58417456e4a84d1ed47c3935a6e0cfb (diff)
downloadffmpeg-streaming-0a8ff1d8bb07e8ffbbe5dbdc3885bcd6113188e6.zip
ffmpeg-streaming-0a8ff1d8bb07e8ffbbe5dbdc3885bcd6113188e6.tar.gz
lavf/network: check return value of setsockopt.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
-rw-r--r--libavformat/network.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index 21c836a..4bae7e2 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;
}
OpenPOWER on IntegriCloud