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
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;
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;