1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-19 14:26:57 +00:00

Fix possible crashes with invalid SDPs that result in stream descriptions

not being initialized.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29626 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-09-02 10:55:36 +00:00
parent ac11b35a6a
commit d1e7b4dc6f
2 changed files with 4 additions and 1 deletions

View File

@ -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))
{

View File

@ -235,6 +235,8 @@ static rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t b
char b[64];
int rulematches[MAX_RULEMATCHES];
if (!desc->stream[i])
continue;
#ifdef LOG
printf("calling asmrp_match with:\n%s\n%u\n", desc->stream[i]->asm_rule_book, bandwidth);
#endif