summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-06-13 09:20:22 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-06-13 09:21:50 +0300
commita913a0b9679dd58945ad105d240db45595fdaba6 (patch)
tree741f7b0398cfd51dc5491318025227784ed5f885
parent02750071071f77149d5dab9a6cb73d25b63177af (diff)
avfassetsrc: Don't escape the URI before passing it to NSURL
The URI must already be escaped by the caller, we don't support passing around invalid (unescaped) URIs via the GstURIHandler interface. Also it will escape too much of the URI in this case, e.g. ipod-library://item/item.m4a?id=3143338395173862951 becomes ipod-library://item/item.m4a%3Fid%3D3143338395173862951 https://bugzilla.gnome.org/show_bug.cgi?id=767492
-rw-r--r--sys/applemedia/avfassetsrc.m7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/applemedia/avfassetsrc.m b/sys/applemedia/avfassetsrc.m
index 873104745..e589cf3f4 100644
--- a/sys/applemedia/avfassetsrc.m
+++ b/sys/applemedia/avfassetsrc.m
@@ -804,15 +804,12 @@ gst_avf_asset_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, GErro
NSString *str;
NSURL *url;
AVAsset *asset;
- gchar *escaped_uri;
gboolean ret = FALSE;
OBJC_CALLOUT_BEGIN ();
- escaped_uri = g_uri_escape_string (uri, ":/", TRUE);
- str = [NSString stringWithUTF8String: escaped_uri];
+ str = [NSString stringWithUTF8String: uri];
url = [[NSURL alloc] initWithString: str];
asset = [AVAsset assetWithURL: url];
- g_free (escaped_uri);
if (asset.playable) {
ret = TRUE;
@@ -820,7 +817,7 @@ gst_avf_asset_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, GErro
self->uri = g_strdup (uri);
} else {
g_set_error (error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI,
- "Invalid URI '%s' for avfassetsrc", self->uri);
+ "Invalid URI '%s' for avfassetsrc", uri);
}
OBJC_CALLOUT_END ();
return ret;