[MPlayer-cvslog] r31120 - in branches/1.0rc3: . stream/librtsp/rtsp_session.c stream/realrtsp/real.c

siretart subversion at mplayerhq.hu
Sat May 1 20:33:11 CEST 2010


Author: siretart
Date: Sat May  1 20:33:11 2010
New Revision: 31120

Log:
Fix possible crashes with invalid SDPs that result in stream descriptions
not being initialized.

backport r29626 by reimar

Modified:
   branches/1.0rc3/   (props changed)
   branches/1.0rc3/stream/librtsp/rtsp_session.c
   branches/1.0rc3/stream/realrtsp/real.c

Modified: branches/1.0rc3/stream/librtsp/rtsp_session.c
==============================================================================
--- branches/1.0rc3/stream/librtsp/rtsp_session.c	Sat May  1 20:31:21 2010	(r31119)
+++ branches/1.0rc3/stream/librtsp/rtsp_session.c	Sat May  1 20:33:11 2010	(r31120)
@@ -139,7 +139,8 @@ rtsp_session_t *rtsp_session_start(int f
     /* we are talking to a real server ... */
 
     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))
       {

Modified: branches/1.0rc3/stream/realrtsp/real.c
==============================================================================
--- branches/1.0rc3/stream/realrtsp/real.c	Sat May  1 20:31:21 2010	(r31119)
+++ branches/1.0rc3/stream/realrtsp/real.c	Sat May  1 20:33:11 2010	(r31120)
@@ -235,6 +235,8 @@ static rmff_header_t *real_parse_sdp(cha
     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


More information about the MPlayer-cvslog mailing list