Mercurial > mplayer.hg
comparison stream/librtsp/rtsp_session.c @ 29584:dc57d7bd98e1
Fix possible crashes with invalid SDPs that result in stream descriptions
not being initialized.
author | reimar |
---|---|
date | Wed, 02 Sep 2009 10:55:36 +0000 |
parents | c990a2cbfa8d |
children | 629b30951662 |
comparison
equal
deleted
inserted
replaced
29583:c990a2cbfa8d | 29584:dc57d7bd98e1 |
---|---|
137 if (strstr(server,RTSP_SERVER_TYPE_REAL) || strstr(server,RTSP_SERVER_TYPE_HELIX)) | 137 if (strstr(server,RTSP_SERVER_TYPE_REAL) || strstr(server,RTSP_SERVER_TYPE_HELIX)) |
138 { | 138 { |
139 /* we are talking to a real server ... */ | 139 /* we are talking to a real server ... */ |
140 | 140 |
141 rmff_header_t *h=real_setup_and_get_header(rtsp_session->s, bandwidth, user, pass); | 141 rmff_header_t *h=real_setup_and_get_header(rtsp_session->s, bandwidth, user, pass); |
142 if (!h) { | 142 if (!h || !h->streams[0]) { |
143 rmff_free_header(h); | |
143 /* got an redirect? */ | 144 /* got an redirect? */ |
144 if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION)) | 145 if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION)) |
145 { | 146 { |
146 free(mrl_line); | 147 free(mrl_line); |
147 mrl_line=strdup(rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION)); | 148 mrl_line=strdup(rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION)); |