use 0.0.0.0 or :: for c= line instead of server address
authorAlexander Schrab <alexas@axis.com>
Wed, 12 Jun 2013 13:22:57 +0000 (15:22 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 14 Jun 2013 13:58:52 +0000 (15:58 +0200)
gst/rtsp-server/rtsp-sdp.c

index 6be99fc..22f6e00 100644 (file)
@@ -131,8 +131,17 @@ gst_rtsp_sdp_from_media (GstSDPMessage * sdp, GstSDPInfo * info,
     gst_sdp_media_set_proto (smedia, "RTP/AVP");
 
     /* for the c= line */
-    gst_sdp_media_add_connection (smedia, "IN", info->server_proto,
-        info->server_ip, 16, 0);
+    if (strcmp (info->server_proto, "IP6") == 0) {
+      gst_sdp_media_add_connection (smedia, "IN", info->server_proto,
+          "::", 16, 0);
+    } else {
+      if (strcmp (info->server_proto, "IP4") != 0) {
+        GST_WARNING ("unknown ip version when creating connection line in sdp,"
+            " using IP4");
+      }
+      gst_sdp_media_add_connection (smedia, "IN", info->server_proto,
+          "0.0.0.0", 16, 0);
+    }
 
     /* get clock-rate, media type and params for the rtpmap attribute */
     gst_structure_get_int (s, "clock-rate", &caps_rate);