diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-08-29 02:42:12 +0530 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-08-30 09:53:42 +0000 |
commit | ce18a344f456707e51c30f1ecba3adca341f0ba9 (patch) | |
tree | e8d7b3524051a220acee6ca9293aa50f130acd5f /gst | |
parent | 16d84a2816ed1e912a4e46e698e633fa7d824e9f (diff) | |
download | gstreamer-plugins-bad-ce18a344f456707e51c30f1ecba3adca341f0ba9.tar.gz |
rtmp2: Need to unescape the userinfo before setting
This regressed in 827afa206d8c9675f2a7af402396552c2ed1df09. The same
fix was also committed to the webrtc element, but rtmp2 was missed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1547>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtmp2/gstrtmp2locationhandler.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/rtmp2/gstrtmp2locationhandler.c b/gst/rtmp2/gstrtmp2locationhandler.c index d8e4367ca..2e421c8e9 100644 --- a/gst/rtmp2/gstrtmp2locationhandler.c +++ b/gst/rtmp2/gstrtmp2locationhandler.c @@ -212,6 +212,7 @@ uri_handler_set_uri (GstURIHandler * handler, const gchar * string, userinfo = gst_uri_get_userinfo (uri); if (userinfo) { + gchar *user, *pass; gchar **split = g_strsplit (userinfo, ":", 2); if (!split || !split[0] || !split[1]) { @@ -226,8 +227,13 @@ uri_handler_set_uri (GstURIHandler * handler, const gchar * string, "assume that the first ':' delineates user:pass. You should escape " "the user and pass before adding to the URI.", userinfo); - g_object_set (self, "username", split[0], "password", split[1], NULL); + user = g_uri_unescape_string (split[0], NULL); + pass = g_uri_unescape_string (split[1], NULL); g_strfreev (split); + + g_object_set (self, "username", user, "password", pass, NULL); + g_free (user); + g_free (pass); } ret = TRUE; |