diff rtsp.c @ 4744:51899c07a4f1 libavformat

Add RTP/ASF header parsing, which is part of the SDP of these streams. See patch discussion in "[PATCH] RTSP-MS 10/15: ASF header parsing" thread.
author rbultje
date Tue, 17 Mar 2009 12:34:57 +0000
parents 7d88e3f6943d
children 06981cf19bc9
line wrap: on
line diff
--- a/rtsp.c	Tue Mar 17 12:27:32 2009 +0000
+++ b/rtsp.c	Tue Mar 17 12:34:57 2009 +0000
@@ -36,6 +36,7 @@
 
 #include "rtpdec.h"
 #include "rdt.h"
+#include "rtp_asf.h"
 
 //#define DEBUG
 //#define DEBUG_RTP_TCP
@@ -496,7 +497,10 @@
         } else if (av_strstart(p, "IsRealDataType:integer;",&p)) {
             if (atoi(p) == 1)
                 rt->transport = RTSP_TRANSPORT_RDT;
-        } else if (s->nb_streams > 0) {
+        } else {
+            if (rt->server_type == RTSP_SERVER_WMS)
+                ff_wms_parse_sdp_a_line(s, p);
+            if (s->nb_streams > 0) {
             if (rt->server_type == RTSP_SERVER_REAL)
                 ff_real_parse_sdp_a_line(s, s->nb_streams - 1, p);
 
@@ -505,6 +509,7 @@
                 rtsp_st->dynamic_handler->parse_sdp_a_line)
                 rtsp_st->dynamic_handler->parse_sdp_a_line(s, s->nb_streams - 1,
                     rtsp_st->dynamic_protocol_context, buf);
+            }
         }
         break;
     }
@@ -853,6 +858,10 @@
         }
     }
     av_free(rt->rtsp_streams);
+    if (rt->asf_ctx) {
+        av_close_input_stream (rt->asf_ctx);
+        rt->asf_ctx = NULL;
+    }
 }
 
 static int