mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavf/network: check return value of setsockopt.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
This commit is contained in:
parent
d428ef0ea5
commit
0a8ff1d8bb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user