[gst-cvs] gst-plugins-good: rtspsrc: allow http:// on the proxy setting

Wim Taymans wtay at kemper.freedesktop.org
Thu Apr 2 13:38:10 PDT 2009


Module: gst-plugins-good
Branch: master
Commit: b6bf3ba7d3138065953cd1858a08dad71cccd566
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=b6bf3ba7d3138065953cd1858a08dad71cccd566

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Thu Apr  2 22:41:01 2009 +0200

rtspsrc: allow http:// on the proxy setting

Allow and ignore http:// at the start of the proxy setting, like
souphttpsrc.
Fixes #573173

---

 gst/rtsp/gstrtspsrc.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index d7f707e..3cb2f9c 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -358,13 +358,13 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass)
    * GstRTSPSrc::proxy
    *
    * Set the proxy parameters. This has to be a string of the format
-   * [user:passwd@]host[:port].
+   * [http://][user:passwd@]host[:port].
    *
    * Since: 0.10.15
    */
   g_object_class_install_property (gobject_class, PROP_PROXY,
       g_param_spec_string ("proxy", "Proxy",
-          "Proxy settings for HTTP tunneling. Format: [user:passwd@]host[:port]",
+          "Proxy settings for HTTP tunneling. Format: [http://][user:passwd@]host[:port]",
           DEFAULT_PROXY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
   gstelement_class->change_state = gst_rtspsrc_change_state;
@@ -457,6 +457,10 @@ gst_rtspsrc_set_proxy (GstRTSPSrc * rtsp, const gchar * proxy)
   if (p == NULL)
     return TRUE;
 
+  /* we allow http:// in front but ignore it */
+  if (g_str_has_prefix (p, "http://"))
+    p += 7;
+
   at = strchr (p, '@');
   if (at) {
     /* look for user:passwd */





More information about the Gstreamer-commits mailing list