summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-05-17 14:56:39 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-05-17 14:56:39 +0000
commitccd7a136a92b43a94d3db61565352be0a59e3014 (patch)
treea6e5d4c18a9c831178e39a420d3cde486e3b0a51 /gst
parent03897942244788349ef186976c04cb3156498438 (diff)
gst/rtsp/gstrtspsrc.c: Ignore streams that fail the setup command, we will retry with a different transport later on.
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send), (gst_rtspsrc_setup_streams): Ignore streams that fail the setup command, we will retry with a different transport later on. * gst/rtsp/rtspextwms.c: (rtsp_ext_wms_parse_sdp), (rtsp_ext_wms_configure_stream): Fix encoding name case.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtsp/gstrtspsrc.c16
-rw-r--r--gst/rtsp/rtspextwms.c4
2 files changed, 17 insertions, 3 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 88c606aa..15861713 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -3069,6 +3069,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
for (walk = src->streams; walk; walk = g_list_next (walk)) {
gchar *transports;
+ RTSPStatusCode code;
stream = (GstRTSPStream *) walk->data;
@@ -3130,9 +3131,21 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
rtsp_message_add_header (&request, RTSP_HDR_TRANSPORT, transports);
g_free (transports);
- if ((res = gst_rtspsrc_send (src, &request, &response, NULL) < 0))
+ /* handle the code ourselves */
+ if ((res = gst_rtspsrc_send (src, &request, &response, &code) < 0))
goto send_error;
+ switch (code) {
+ case RTSP_STS_OK:
+ break;
+ case RTSP_STS_UNSUPPORTED_TRANSPORT:
+ /* cleanup of leftover transport */
+ gst_rtspsrc_stream_free_udp (stream);
+ goto next_stream;
+ default:
+ goto send_error;
+ }
+
/* parse response transport */
{
gchar *resptrans = NULL;
@@ -3185,6 +3198,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
stream);
}
}
+ next_stream:
/* clean up our transport struct */
rtsp_transport_init (&transport);
}
diff --git a/gst/rtsp/rtspextwms.c b/gst/rtsp/rtspextwms.c
index 30e21362..b79a4586 100644
--- a/gst/rtsp/rtspextwms.c
+++ b/gst/rtsp/rtspextwms.c
@@ -127,7 +127,7 @@ rtsp_ext_wms_parse_sdp (RTSPExtensionCtx * ctx, SDPMessage * sdp)
if (maxps)
gst_structure_set (src->props, "maxps", G_TYPE_STRING, maxps, NULL);
- gst_structure_set (src->props, "encoding-name", G_TYPE_STRING, "x-asf-pf",
+ gst_structure_set (src->props, "encoding-name", G_TYPE_STRING, "X-ASF-PF",
NULL);
gst_structure_set (src->props, "media", G_TYPE_STRING, "application", NULL);
@@ -159,7 +159,7 @@ rtsp_ext_wms_configure_stream (RTSPExtensionCtx * ctx, GstRTSPStream * stream)
encoding);
/* rtx streams do not need to be configured */
- if (!strcmp (encoding, "x-wms-rtx"))
+ if (!strcmp (encoding, "X-WMS-RTX"))
return FALSE;
return TRUE;