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-27 09:25:15 +0300
commit3b64e8a1771b901054857c708fd3f646b8338462 (patch)
tree7469222b0c3d7989430e0cad11f40ea1ae83443f
parent0e395b5c620c0ca6e7189328de3d848f42dc443b (diff)
downloadgstreamer-plugins-bad-3b64e8a1771b901054857c708fd3f646b8338462.tar.gz
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 40496a48a..9bb1197c7 100644
--- a/sys/applemedia/avfassetsrc.m
+++ b/sys/applemedia/avfassetsrc.m
@@ -806,15 +806,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;
@@ -822,7 +819,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;