summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 5acaf30e90..45ee86688f 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -344,6 +344,21 @@ int ffurl_get_file_handle(URLContext *h)
return h->prot->url_get_file_handle(h);
}
+int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles)
+{
+ if (!h->prot->url_get_multi_file_handle) {
+ if (!h->prot->url_get_file_handle)
+ return AVERROR(ENOSYS);
+ *handles = av_malloc(sizeof(*handles));
+ if (!*handles)
+ return AVERROR(ENOMEM);
+ *numhandles = 1;
+ *handles[0] = h->prot->url_get_file_handle(h);
+ return 0;
+ }
+ return h->prot->url_get_multi_file_handle(h, handles, numhandles);
+}
+
int ffurl_shutdown(URLContext *h, int flags)
{
if (!h->prot->url_shutdown)