From 4a99d7888bce0c546de70aad53265c4b2d14ca2d Mon Sep 17 00:00:00 2001 From: Stefan Holst Date: Mon, 16 Dec 2002 23:17:34 +0000 Subject: bigger header and receive buffers in rtsp_session. CVS patchset: 3565 CVS date: 2002/12/16 23:17:34 --- src/input/librtsp/rtsp_session.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') 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; -- cgit v1.2.3