rtspsrc: Don't disable UDP protocols on redirecting

https://bugzilla.gnome.org/show_bug.cgi?id=768232
This commit is contained in:
Brad Lackey 2016-07-01 10:05:00 +00:00 committed by Sebastian Dröge
parent 231018bcfe
commit 6d3071f200

View file

@ -4878,26 +4878,30 @@ gst_rtspsrc_reconnect (GstRTSPSrc * src, gboolean async)
if (!restart) if (!restart)
goto done; goto done;
/* we can try only TCP now */ /* unless redirect, try tcp */
if (!src->need_redirect)
src->cur_protocols = GST_RTSP_LOWER_TRANS_TCP; src->cur_protocols = GST_RTSP_LOWER_TRANS_TCP;
/* close and cleanup our state */ /* close and cleanup our state */
if ((res = gst_rtspsrc_close (src, async, FALSE)) < 0) if ((res = gst_rtspsrc_close (src, async, FALSE)) < 0)
goto done; goto done;
/* see if we have TCP left to try. Also don't try TCP when we were configured /* unless redirect, see if we have TCP left to try. Also don't
* with an SDP. */ * try TCP when we were configured with an SDP. */
if (!(src->protocols & GST_RTSP_LOWER_TRANS_TCP) || src->from_sdp) if (!src->need_redirect && (!(src->protocols & GST_RTSP_LOWER_TRANS_TCP)
|| src->from_sdp))
goto no_protocols; goto no_protocols;
if (!src->need_redirect) {
/* We post a warning message now to inform the user /* We post a warning message now to inform the user
* that nothing happened. It's most likely a firewall thing. */ * that nothing happened. It's most likely a firewall thing. */
GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL), GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
("Could not receive any UDP packets for %.4f seconds, maybe your " ("Could not receive any UDP packets for %.4f seconds, maybe your "
"firewall is blocking it. Retrying using a TCP connection.", "firewall is blocking it. Retrying using a tcp connection.",
gst_guint64_to_gdouble (src->udp_timeout / 1000000.0))); gst_guint64_to_gdouble (src->udp_timeout / 1000000.0)));
}
/* open new connection using tcp */ /* unless redirect, open new connection using tcp */
if (gst_rtspsrc_open (src, async) < 0) if (gst_rtspsrc_open (src, async) < 0)
goto open_failed; goto open_failed;