From 2758cdedfb7ac61f8b5e4861f99218b6fd43491d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 19 Feb 2016 10:39:29 +0100 Subject: lavf: reorganize URLProtocols Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits. --- libavformat/http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat/http.c') diff --git a/libavformat/http.c b/libavformat/http.c index b3e9771757..6886e151a1 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -1013,7 +1013,7 @@ static const AVClass flavor ## _context_class = { \ #if CONFIG_HTTP_PROTOCOL HTTP_CLASS(http); -URLProtocol ff_http_protocol = { +const URLProtocol ff_http_protocol = { .name = "http", .url_open2 = http_open, .url_read = http_read, @@ -1031,7 +1031,7 @@ URLProtocol ff_http_protocol = { #if CONFIG_HTTPS_PROTOCOL HTTP_CLASS(https); -URLProtocol ff_https_protocol = { +const URLProtocol ff_https_protocol = { .name = "https", .url_open2 = http_open, .url_read = http_read, @@ -1142,7 +1142,7 @@ static int http_proxy_write(URLContext *h, const uint8_t *buf, int size) return ffurl_write(s->hd, buf, size); } -URLProtocol ff_httpproxy_protocol = { +const URLProtocol ff_httpproxy_protocol = { .name = "httpproxy", .url_open = http_proxy_open, .url_read = http_buf_read, -- cgit v1.2.3