forked from saiten/ios-librtmp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrtmp-ios.patch
More file actions
28 lines (26 loc) · 857 Bytes
/
librtmp-ios.patch
File metadata and controls
28 lines (26 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git librtmp/hashswf.c librtmp/hashswf.c
index 9f4e2c0..90daffa 100644
--- librtmp/hashswf.c
+++ librtmp/hashswf.c
@@ -480,7 +480,10 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash,
#else /* !_WIN32 */
hpre.av_val = "";
hpre.av_len = 0;
- home.av_val = getenv("HOME");
+ char tmp_dir[1024];
+ strcpy(tmp_dir, getenv("HOME"));
+ strcat(tmp_dir, "/tmp");
+ home.av_val = tmp_dir;
#define DIRSEP "/"
#endif
if (!home.av_val)
diff --git librtmp/rtmp.c librtmp/rtmp.c
index 52d0254..a1af6d6 100644
--- librtmp/rtmp.c
+++ librtmp/rtmp.c
@@ -853,6 +853,7 @@ RTMP_Connect0(RTMP *r, struct sockaddr * service)
}
}
+ setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_NOSIGPIPE, (char *) &on, sizeof(on));
setsockopt(r->m_sb.sb_socket, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on));
return TRUE;