switch (st->lower_transport) {
case GST_RTSP_LOWER_TRANS_UDP:
st->client_port = ct->client_port;
- gst_rtsp_stream_get_server_port (state->stream, &st->server_port,
- family);
+ gst_rtsp_stream_get_server_port (state->stream, &st->server_port, family);
break;
case GST_RTSP_LOWER_TRANS_UDP_MCAST:
st->port = ct->port;
gst_sdp_message_add_attribute (sdp, "type", "broadcast");
gst_sdp_message_add_attribute (sdp, "control", "*");
- info.server_proto = proto;
- info.server_ip = g_strdup (priv->server_ip);
+ info.is_ipv6 = priv->is_ipv6;
+ info.server_ip = priv->server_ip;
/* create an SDP for the media object */
if (!gst_rtsp_sdp_from_media (sdp, &info, media))
goto no_sdp;
- g_free (info.server_ip);
-
return sdp;
/* ERRORS */
no_sdp:
{
GST_ERROR ("client %p: could not create SDP", client);
- g_free (info.server_ip);
gst_sdp_message_free (sdp);
return NULL;
}
gst_sdp_media_set_proto (smedia, "RTP/AVP");
/* for the c= line */
- if (strcmp (info->server_proto, "IP6") == 0) {
- gst_sdp_media_add_connection (smedia, "IN", info->server_proto,
- "::", 16, 0);
+ if (info->is_ipv6) {
+ gst_sdp_media_add_connection (smedia, "IN", "IP6", "::", 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);
+ gst_sdp_media_add_connection (smedia, "IN", "IP4", "0.0.0.0", 16, 0);
}
/* get clock-rate, media type and params for the rtpmap attribute */