[MPlayer-cvslog] r31118 - branches/1.0rc3/stream/librtsp/rtsp_session.c
siretart
subversion at mplayerhq.hu
Sat May 1 20:30:01 CEST 2010
Author: siretart
Date: Sat May 1 20:30:01 2010
New Revision: 31118
Log:
M-x whitespace-cleanup
Modified:
branches/1.0rc3/stream/librtsp/rtsp_session.c
Modified: branches/1.0rc3/stream/librtsp/rtsp_session.c
==============================================================================
--- branches/1.0rc3/stream/librtsp/rtsp_session.c Sat May 1 20:26:58 2010 (r31117)
+++ branches/1.0rc3/stream/librtsp/rtsp_session.c Sat May 1 20:30:01 2010 (r31118)
@@ -77,7 +77,7 @@ struct rtsp_session_s {
};
/*
- * closes an rtsp connection
+ * closes an rtsp connection
*/
static void rtsp_close(rtsp_t *s) {
@@ -96,7 +96,7 @@ static void rtsp_close(rtsp_t *s) {
if (s->user_agent) free(s->user_agent);
rtsp_free_answers(s);
rtsp_unschedule_all(s);
- free(s);
+ free(s);
}
//rtsp_session_t *rtsp_session_start(char *mrl) {
@@ -112,7 +112,7 @@ rtsp_session_t *rtsp_session_start(int f
rtsp_session->s = NULL;
rtsp_session->real_session = NULL;
rtsp_session->rtp_session = NULL;
-
+
//connect:
*redir = 0;
@@ -143,28 +143,28 @@ rtsp_session_t *rtsp_session_start(int f
/* got an redirect? */
if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION))
{
- free(mrl_line);
+ free(mrl_line);
mrl_line=strdup(rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION));
- mp_msg (MSGT_OPEN, MSGL_INFO,"rtsp_session: redirected to %s\n", mrl_line);
+ mp_msg (MSGT_OPEN, MSGL_INFO,"rtsp_session: redirected to %s\n", mrl_line);
rtsp_close(rtsp_session->s);
free(server);
- free(*mrl);
- free(rtsp_session);
- /* tell the caller to redirect, return url to redirect to in mrl */
- *mrl = mrl_line;
- *redir = 1;
- return NULL;
+ free(*mrl);
+ free(rtsp_session);
+ /* tell the caller to redirect, return url to redirect to in mrl */
+ *mrl = mrl_line;
+ *redir = 1;
+ return NULL;
// goto connect; /* *shudder* i made a design mistake somewhere */
} else
{
- mp_msg (MSGT_OPEN, MSGL_ERR,"rtsp_session: session can not be established.\n");
- rtsp_close(rtsp_session->s);
- free (server);
- free(rtsp_session);
- return NULL;
+ mp_msg (MSGT_OPEN, MSGL_ERR,"rtsp_session: session can not be established.\n");
+ rtsp_close(rtsp_session->s);
+ free (server);
+ free(rtsp_session);
+ return NULL;
}
}
-
+
rtsp_session->real_session = init_real_rtsp_session ();
if(!strncmp(h->streams[0]->mime_type, "application/vnd.rn-rmadriver", h->streams[0]->mime_type_size) ||
!strncmp(h->streams[0]->mime_type, "application/smil", h->streams[0]->mime_type_size)) {
@@ -177,19 +177,19 @@ rtsp_session_t *rtsp_session_start(int f
rmff_dump_header (h, (char *) rtsp_session->real_session->header, HEADER_SIZE);
if (rtsp_session->real_session->header_len < 0) {
- mp_msg (MSGT_OPEN, MSGL_ERR,"rtsp_session: error while dumping RMFF headers, session can not be established.\n");
- free_real_rtsp_session(rtsp_session->real_session);
- rtsp_close(rtsp_session->s);
- free (server);
- free (mrl_line);
- free(rtsp_session);
- return NULL;
+ mp_msg (MSGT_OPEN, MSGL_ERR,"rtsp_session: error while dumping RMFF headers, session can not be established.\n");
+ free_real_rtsp_session(rtsp_session->real_session);
+ rtsp_close(rtsp_session->s);
+ free (server);
+ free (mrl_line);
+ free(rtsp_session);
+ return NULL;
}
rtsp_session->real_session->recv =
xbuffer_copyin (rtsp_session->real_session->recv, 0,
- rtsp_session->real_session->header,
- rtsp_session->real_session->header_len);
+ rtsp_session->real_session->header,
+ rtsp_session->real_session->header_len);
rtsp_session->real_session->recv_size =
rtsp_session->real_session->header_len;
@@ -211,12 +211,12 @@ rtsp_session_t *rtsp_session_start(int f
/* check for minimalistic RTSP RFC compliance */
if (!strstr (public, RTSP_METHOD_DESCRIBE)
- || !strstr (public, RTSP_METHOD_SETUP)
- || !strstr (public, RTSP_METHOD_PLAY)
- || !strstr (public, RTSP_METHOD_TEARDOWN))
+ || !strstr (public, RTSP_METHOD_SETUP)
+ || !strstr (public, RTSP_METHOD_PLAY)
+ || !strstr (public, RTSP_METHOD_TEARDOWN))
{
mp_msg (MSGT_OPEN, MSGL_ERR,
- "Remote server does not meet minimal RTSP 1.0 compliance.\n");
+ "Remote server does not meet minimal RTSP 1.0 compliance.\n");
rtsp_close (rtsp_session->s);
free (server);
free (mrl_line);
@@ -239,12 +239,12 @@ rtsp_session_t *rtsp_session_start(int f
}
}
free(server);
-
+
return rtsp_session;
}
int rtsp_session_read (rtsp_session_t *this, char *data, int len) {
-
+
if (this->real_session) {
int to_copy=len;
char *dest=data;
@@ -257,7 +257,7 @@ int rtsp_session_read (rtsp_session_t *t
if (len < 0) return 0;
if (this->real_session->recv_size < 0) return -1;
while (to_copy > fill) {
-
+
memcpy(dest, source, fill);
to_copy -= fill;
dest += fill;
@@ -278,7 +278,7 @@ int rtsp_session_read (rtsp_session_t *t
return len-to_copy;
}
}
-
+
memcpy(dest, source, to_copy);
this->real_session->recv_read += to_copy;
@@ -298,7 +298,7 @@ int rtsp_session_read (rtsp_session_t *t
if (l == 0)
rtsp_session_end (this);
-
+
return l;
}
More information about the MPlayer-cvslog
mailing list