[totem] Bug 594320 - Playing youtube videos results in 404 in gst_soup_http_src_parse_status()



commit fa91ff0afbc93df01a302b46d9b5d236e874d702
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Sep 11 00:26:54 2009 +0100

    Bug 594320 - Playing youtube videos results in 404 in gst_soup_http_src_parse_status()
    
    The "t" parameter is a bit too escaped (it's escaped in the gdata xml,
    and again by g_string_append_uri_escaped()).
    
    So unescape it before escaping it again.

 src/plugins/youtube/totem-youtube.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/youtube/totem-youtube.c b/src/plugins/youtube/totem-youtube.c
index 01ce06d..d2ff64b 100644
--- a/src/plugins/youtube/totem-youtube.c
+++ b/src/plugins/youtube/totem-youtube.c
@@ -513,12 +513,17 @@ resolve_t_param_cb (GObject *source_object, GAsyncResult *result, TParamData *da
 	/* Check for the t parameter, which is now in a JavaScript array on the video page */
 	g_regex_match (self->regex, contents, 0, &match_info);
 	if (g_match_info_matches (match_info) == TRUE) {
-		gchar *t_param;
+		gchar *t_param, *s;
 		const gchar *fmt_param;
 		GString *video_uri_string;
 
 		/* We have a match */
-		t_param = g_match_info_fetch (match_info, 1);
+		s = g_match_info_fetch (match_info, 1);
+		t_param = g_uri_unescape_string (s, NULL);
+		if (t_param == NULL)
+			t_param = s;
+		else
+			g_free (s);
 		fmt_param = get_fmt_param (self);
 
 		video_uri_string = g_string_new ("http://www.youtube.com/get_video?video_id=";);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]