summaryrefslogtreecommitdiff
path: root/libavformat/protocols.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-29 16:56:47 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-29 16:56:47 +0000
commit8fd5342463b07fdfe2f6e89620182380c1c10ab8 (patch)
tree08e5fc22df38d0c5dc9c91df2544ecd6cabfa43d /libavformat/protocols.c
parent9c75148e6ebc88a0501e3d0242defb6dbdc3c23d (diff)
parent0fa00d05911aa8043ecad8dead4a73cab7faadf6 (diff)
downloadffmpeg-8fd5342463b07fdfe2f6e89620182380c1c10ab8.tar.gz
Merge commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6'
* commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6': lavf: move avio_enum_protocols() to protocols.c Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
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 269a63b507..2c48983c87 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -206,3 +206,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);
+}