summaryrefslogtreecommitdiff
path: root/libavformat/protocols.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-02-19 10:49:10 +0100
committerAnton Khirnov <anton@khirnov.net>2016-02-22 11:35:46 +0100
commit0fa00d05911aa8043ecad8dead4a73cab7faadf6 (patch)
tree21c29596c5dec151bd893705b27d2c6d5d165eb5 /libavformat/protocols.c
parent2758cdedfb7ac61f8b5e4861f99218b6fd43491d (diff)
downloadffmpeg-0fa00d05911aa8043ecad8dead4a73cab7faadf6.tar.gz
lavf: move avio_enum_protocols() to protocols.c
It's a more appropriate place for it.
Diffstat (limited to 'libavformat/protocols.c')
-rw-r--r--libavformat/protocols.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index a97aa1008d..c1e9989a0a 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -162,3 +162,18 @@ const URLProtocol *ff_url_protocols[] = {
#endif
NULL,
};
+
+const char *avio_enum_protocols(void **opaque, int output)
+{
+ const URLProtocol **p = *opaque;
+
+ p = p ? p + 1 : ff_url_protocols;
+ *opaque = p;
+ if (!*p) {
+ *opaque = NULL;
+ return NULL;
+ }
+ if ((output && (*p)->url_write) || (!output && (*p)->url_read))
+ return (*p)->name;
+ return avio_enum_protocols(opaque, output);
+}