summaryrefslogtreecommitdiffstats
path: root/stream/librtsp/rtsp_session.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-04 19:49:35 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-04 19:49:35 +0300
commit0e1b7765be878491565cf5e471f22b15e106164c (patch)
tree422e500c289335182a2a64934dcabf10b95e32dc /stream/librtsp/rtsp_session.c
parenta9618c1c6fe9424dfaeb1677348e0382d7252554 (diff)
parentdcfd043ea8d0c46929aad78596314d837c290d39 (diff)
downloadmpv-0e1b7765be878491565cf5e471f22b15e106164c.tar.bz2
mpv-0e1b7765be878491565cf5e471f22b15e106164c.tar.xz
Merge svn changes up to r29644
Diffstat (limited to 'stream/librtsp/rtsp_session.c')
-rw-r--r--stream/librtsp/rtsp_session.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/stream/librtsp/rtsp_session.c b/stream/librtsp/rtsp_session.c
index 8b87d7fb41..33c36f15b9 100644
--- a/stream/librtsp/rtsp_session.c
+++ b/stream/librtsp/rtsp_session.c
@@ -94,6 +94,7 @@ static void rtsp_close(rtsp_t *s) {
if (s->mrl) free(s->mrl);
if (s->session) free(s->session);
if (s->user_agent) free(s->user_agent);
+ free(s->server);
rtsp_free_answers(s);
rtsp_unschedule_all(s);
free(s);
@@ -106,7 +107,6 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
rtsp_session_t *rtsp_session = NULL;
char *server;
char *mrl_line = NULL;
- rmff_header_t *h;
rtsp_session = malloc (sizeof (rtsp_session_t));
rtsp_session->s = NULL;
@@ -138,8 +138,9 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
{
/* we are talking to a real server ... */
- h=real_setup_and_get_header(rtsp_session->s, bandwidth, user, pass);
- if (!h) {
+ rmff_header_t *h=real_setup_and_get_header(rtsp_session->s, bandwidth, user, pass);
+ if (!h || !h->streams[0]) {
+ rmff_free_header(h);
/* got an redirect? */
if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION))
{
@@ -195,6 +196,7 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
rtsp_session->real_session->header_len;
}
rtsp_session->real_session->recv_read = 0;
+ rmff_free_header(h);
} else /* not a Real server : try RTP instead */
{
char *public = NULL;