Merge commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56'

* commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56':
  lavf: move urlcontext_child_class_next() to protocols.c

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis
2016-02-29 16:59:47 +00:00
3 changed files with 24 additions and 20 deletions

View File

@@ -207,6 +207,26 @@ const URLProtocol *ff_url_protocols[] = {
NULL,
};
const AVClass *ff_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;
}
const char *avio_enum_protocols(void **opaque, int output)
{
const URLProtocol **p = *opaque;