diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-23 16:35:36 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-23 16:39:36 +0200 |
commit | 81d7a297f745f8a76a5459a1071596a2873e5a19 (patch) | |
tree | f277abc85675355bbb337719842f2ada446d7cf8 | |
parent | da4c1c92270b02b039cd9da08c9addc38ec47b4d (diff) |
rtspsrc: use same protocols after redirect
After a redirect we want to use the same protocols that we were using for the
current url.
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index d0c007b8..c49eddf9 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -3778,6 +3778,7 @@ error_response: case GST_RTSP_STS_MOVE_TEMPORARILY: { gchar *new_location; + GstRTSPLowerTrans transports; GST_DEBUG_OBJECT (src, "got redirection"); /* if we don't have a Location Header, we must error */ @@ -3790,8 +3791,18 @@ error_response: * a new setup when it detects this state change. */ GST_DEBUG_OBJECT (src, "redirection to %s", new_location); + /* save current transports */ + if (src->url) + transports = src->url->transports; + else + transports = GST_RTSP_LOWER_TRANS_UNKNOWN; + gst_rtspsrc_uri_set_uri (GST_URI_HANDLER (src), new_location); + /* set old transports */ + if (src->url && transports != GST_RTSP_LOWER_TRANS_UNKNOWN) + src->url->transports = transports; + src->need_redirect = TRUE; src->state = GST_RTSP_STATE_INIT; res = GST_RTSP_OK; |