mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
URLContext: switch to child_class_iterate()
This commit is contained in:
parent
c7d8d8d8d9
commit
43ed2b86d6
3 changed files with 23 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ extern const URLProtocol ff_libzmq_protocol;
|
|||
|
||||
#include "libavformat/protocol_list.c"
|
||||
|
||||
#if FF_API_CHILD_CLASS_NEXT
|
||||
const AVClass *ff_urlcontext_child_class_next(const AVClass *prev)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -91,7 +92,22 @@ const AVClass *ff_urlcontext_child_class_next(const AVClass *prev)
|
|||
return url_protocols[i]->priv_data_class;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
const AVClass *ff_urlcontext_child_class_iterate(void **iter)
|
||||
{
|
||||
const AVClass *ret = NULL;
|
||||
uintptr_t i;
|
||||
|
||||
for (i = (uintptr_t)*iter; url_protocols[i]; i++) {
|
||||
ret = url_protocols[i]->priv_data_class;
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
||||
*iter = (void*)(uintptr_t)(url_protocols[i] ? i + 1 : i);
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *avio_enum_protocols(void **opaque, int output)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue