summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Holst <holstsn@users.sourceforge.net>2002-12-16 23:17:34 +0000
committerStefan Holst <holstsn@users.sourceforge.net>2002-12-16 23:17:34 +0000
commit4a99d7888bce0c546de70aad53265c4b2d14ca2d (patch)
tree4544d3460228d8adfd38b90a6f11ace60eebd893 /src
parenta2ce19ef7930303350698d1b684080b061a57d7c (diff)
downloadxine-lib-4a99d7888bce0c546de70aad53265c4b2d14ca2d.tar.gz
xine-lib-4a99d7888bce0c546de70aad53265c4b2d14ca2d.tar.bz2
bigger header and receive buffers in rtsp_session.
CVS patchset: 3565 CVS date: 2002/12/16 23:17:34
Diffstat (limited to 'src')
-rw-r--r--src/input/librtsp/rtsp_session.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c
index 04302a7d2..4bbdbc8b6 100644
--- a/src/input/librtsp/rtsp_session.c
+++ b/src/input/librtsp/rtsp_session.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: rtsp_session.c,v 1.4 2002/12/16 21:50:55 holstsn Exp $
+ * $Id: rtsp_session.c,v 1.5 2002/12/16 23:17:34 holstsn Exp $
*
* high level interface to rtsp servers.
*/
@@ -41,8 +41,8 @@
#define LOG
*/
-#define BUF_SIZE 1024
-#define HEADER_SIZE 1024
+#define BUF_SIZE 4096
+#define HEADER_SIZE 4096
struct rtsp_session_s {
@@ -128,26 +128,26 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) {
char *dest=data;
char *source=this->recv + this->recv_read;
int fill=this->recv_size - this->recv_read;
-
+
if (len < 0) return 0;
while (to_copy > fill) {
memcpy(dest, source, fill);
to_copy -= fill;
dest += fill;
- this->recv_read=0;
+ this->recv_read = 0;
+ source = this->recv;
+ this->recv_size = real_get_rdt_chunk (this->s, source);
+ fill = this->recv_size;
- this->recv_size=real_get_rdt_chunk (this->s, this->recv);
if (this->recv_size == 0) {
#ifdef LOG
printf ("librtsp: %d of %d bytes provided\n", len-to_copy, len);
#endif
return len-to_copy;
}
- source = this->recv;
- fill = this->recv_size - this->recv_read;
}
-
+
memcpy(dest, source, to_copy);
this->recv_read += to_copy;