aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/url.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-02-19 11:17:22 +0100
committerAnton Khirnov <anton@khirnov.net>2016-02-22 11:35:57 +0100
commit832a202c47a246ed15e3edc6b05dfcfa7d82c4b2 (patch)
tree6588a47d57c9301ae3ac1d97aae81c1a1ec205f5 /libavformat/url.h
parent7d61dc95d741ca134d59b1f34c4e10c4c4e36f56 (diff)
downloadffmpeg-832a202c47a246ed15e3edc6b05dfcfa7d82c4b2.tar.gz
protocols: make the list of protocols static
Disallow other code to touch it directly, now it's only accessible through a blacklisting/whitelisting function.
Diffstat (limited to 'libavformat/url.h')
-rw-r--r--libavformat/url.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/libavformat/url.h b/libavformat/url.h
index 3006905446..455021964e 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -266,6 +266,20 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
const AVClass *ff_urlcontext_child_class_next(const AVClass *prev);
-extern const URLProtocol *ff_url_protocols[];
+/**
+ * Construct a list of protocols matching a given whitelist and/or blacklist.
+ *
+ * @param whitelist a comma-separated list of allowed protocol names or NULL. If
+ * this is a non-empty string, only protocols in this list will
+ * be included.
+ * @param blacklist a comma-separated list of forbidden protocol names or NULL.
+ * If this is a non-empty string, all protocols in this list
+ * will be excluded.
+ *
+ * @return a NULL-terminated array of matching protocols. The array must be
+ * freed by the caller.
+ */
+const URLProtocol **ffurl_get_protocols(const char *whitelist,
+ const char *blacklist);
#endif /* AVFORMAT_URL_H */