comparison stream/librtsp/rtsp.c @ 31500:b01f807eb183

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.
author reimar
date Sun, 27 Jun 2010 15:04:13 +0000
parents 0f1b5b68af32
children 8fa2f43cb760
comparison
equal deleted inserted replaced
31499:c0fdef79a5d5 31500:b01f807eb183
49 #endif 49 #endif
50 #include "mp_msg.h" 50 #include "mp_msg.h"
51 #include "rtsp.h" 51 #include "rtsp.h"
52 #include "rtsp_session.h" 52 #include "rtsp_session.h"
53 #include "osdep/timer.h" 53 #include "osdep/timer.h"
54 #include "stream/network.h"
54 55
55 /* 56 /*
56 #define LOG 57 #define LOG
57 */ 58 */
58 59
65 66
66 total = 0; timeout = 30; 67 total = 0; timeout = 30;
67 while (total < len){ 68 while (total < len){
68 int n; 69 int n;
69 70
70 n = send (s, &buf[total], len - total, 0); 71 n = send (s, &buf[total], len - total, DEFAULT_SEND_FLAGS);
71 72
72 if (n > 0) 73 if (n > 0)
73 total += n; 74 total += n;
74 else if (n < 0) { 75 else if (n < 0) {
75 #if !HAVE_WINSOCK2_H 76 #if !HAVE_WINSOCK2_H