summaryrefslogtreecommitdiffstats
path: root/stream/librtsp
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-06-27 15:04:13 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:11:43 +0200
commit41d25ebcc8bc8601bd66f5435c75fdff25cadc17 (patch)
tree6cf36aab161902d1b1cd508e89e0acfaf1592c18 /stream/librtsp
parente55135212138800f0107247c1f3ded81366cd123 (diff)
downloadmpv-41d25ebcc8bc8601bd66f5435c75fdff25cadc17.tar.bz2
mpv-41d25ebcc8bc8601bd66f5435c75fdff25cadc17.tar.xz
stream: Use MSG_NOSIGNAL flag if available for send().
This avoids MPlayer quitting due to SIGPIPE at least for these cases. Ignoring SIGPIPE in general would break window-closing with some window-managers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31566 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/librtsp')
-rw-r--r--stream/librtsp/rtsp.c3
-rw-r--r--stream/librtsp/rtsp_rtp.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/stream/librtsp/rtsp.c b/stream/librtsp/rtsp.c
index 53ed233c53..82669616ac 100644
--- a/stream/librtsp/rtsp.c
+++ b/stream/librtsp/rtsp.c
@@ -51,6 +51,7 @@
#include "rtsp.h"
#include "rtsp_session.h"
#include "osdep/timer.h"
+#include "stream/network.h"
/*
#define LOG
@@ -67,7 +68,7 @@ static int write_stream(int s, const char *buf, int len) {
while (total < len){
int n;
- n = send (s, &buf[total], len - total, 0);
+ n = send (s, &buf[total], len - total, DEFAULT_SEND_FLAGS);
if (n > 0)
total += n;
diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c
index 37400e62d1..0a8eed3392 100644
--- a/stream/librtsp/rtsp_rtp.c
+++ b/stream/librtsp/rtsp_rtp.c
@@ -93,7 +93,7 @@ rtcp_send_rr (rtsp_t *s, struct rtp_rtsp_session_t *st)
{
char rtcp_content[RTCP_RR_SIZE];
strcpy (rtcp_content, RTCP_RR);
- send (st->rtcp_socket, rtcp_content, RTCP_RR_SIZE, 0);
+ send (st->rtcp_socket, rtcp_content, RTCP_RR_SIZE, DEFAULT_SEND_FLAGS);
/* ping RTSP server to keep connection alive.
we use OPTIONS instead of PING as not all servers support it */