mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00: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
1 changed files with 5 additions and 2 deletions
|
|
@ -194,8 +194,11 @@ int ff_socket(int af, int type, int proto)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef SO_NOSIGPIPE
|
#ifdef SO_NOSIGPIPE
|
||||||
if (fd != -1)
|
if (fd != -1) {
|
||||||
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int));
|
if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int))) {
|
||||||
|
av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_NOSIGPIPE) failed\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue