diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-02-19 10:59:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-02-22 11:35:52 +0100 |
commit | 7d61dc95d741ca134d59b1f34c4e10c4c4e36f56 (patch) | |
tree | 991bdcdab7530e40e22d52d802fc4b0b36fb8dc3 /libavformat/avio.c | |
parent | 0fa00d05911aa8043ecad8dead4a73cab7faadf6 (diff) | |
download | ffmpeg-7d61dc95d741ca134d59b1f34c4e10c4c4e36f56.tar.gz |
lavf: move urlcontext_child_class_next() to protocols.c
It needs to access the list of protocols directly, so it more properly
belongs there.
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 3ead41ae86..b4e57e943a 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -49,25 +49,6 @@ static void *urlcontext_child_next(void *obj, void *prev) return NULL; } -static const AVClass *urlcontext_child_class_next(const AVClass *prev) -{ - int i; - - /* find the protocol that corresponds to prev */ - for (i = 0; ff_url_protocols[i]; i++) { - if (ff_url_protocols[i]->priv_data_class == prev) { - i++; - break; - } - } - - /* find next protocol with priv options */ - for (; ff_url_protocols[i]; i++) - if (ff_url_protocols[i]->priv_data_class) - return ff_url_protocols[i]->priv_data_class; - return NULL; -} - static const AVOption options[] = { { NULL } }; const AVClass ffurl_context_class = { .class_name = "URLContext", @@ -75,7 +56,7 @@ const AVClass ffurl_context_class = { .option = options, .version = LIBAVUTIL_VERSION_INT, .child_next = urlcontext_child_next, - .child_class_next = urlcontext_child_class_next, + .child_class_next = ff_urlcontext_child_class_next, }; /*@}*/ |