mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
rtspsrc: use same protocols after redirect
After a redirect we want to use the same protocols that we were using for the current url.
This commit is contained in:
parent
da4c1c9227
commit
81d7a297f7
1 changed files with 11 additions and 0 deletions
|
@ -3778,6 +3778,7 @@ error_response:
|
||||||
case GST_RTSP_STS_MOVE_TEMPORARILY:
|
case GST_RTSP_STS_MOVE_TEMPORARILY:
|
||||||
{
|
{
|
||||||
gchar *new_location;
|
gchar *new_location;
|
||||||
|
GstRTSPLowerTrans transports;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "got redirection");
|
GST_DEBUG_OBJECT (src, "got redirection");
|
||||||
/* if we don't have a Location Header, we must error */
|
/* 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. */
|
* a new setup when it detects this state change. */
|
||||||
GST_DEBUG_OBJECT (src, "redirection to %s", new_location);
|
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);
|
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->need_redirect = TRUE;
|
||||||
src->state = GST_RTSP_STATE_INIT;
|
src->state = GST_RTSP_STATE_INIT;
|
||||||
res = GST_RTSP_OK;
|
res = GST_RTSP_OK;
|
||||||
|
|
Loading…
Reference in a new issue