mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6'
* commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6': lavf: move avio_enum_protocols() to protocols.c Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
commit
8fd5342463
|
@ -86,21 +86,6 @@ const AVClass ffurl_context_class = {
|
|||
};
|
||||
/*@}*/
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up,
|
||||
const char *filename, int flags,
|
||||
const AVIOInterruptCB *int_cb)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue