summaryrefslogtreecommitdiffstats
path: root/stream/librtsp/rtsp_session.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/librtsp/rtsp_session.c')
-rw-r--r--stream/librtsp/rtsp_session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/librtsp/rtsp_session.c b/stream/librtsp/rtsp_session.c
index 72b8a2a607..33c36f15b9 100644
--- a/stream/librtsp/rtsp_session.c
+++ b/stream/librtsp/rtsp_session.c
@@ -139,7 +139,8 @@ rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
/* we are talking to a real server ... */
rmff_header_t *h=real_setup_and_get_header(rtsp_session->s, bandwidth, user, pass);
- if (!h) {
+ if (!h || !h->streams[0]) {
+ rmff_free_header(h);
/* got an redirect? */
if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION))
{