diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-02-19 10:39:29 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-02-22 11:30:58 +0100 |
commit | 2758cdedfb7ac61f8b5e4861f99218b6fd43491d (patch) | |
tree | 7280b43fe38dff1db077ffd8ebfeabbb850718d4 /libavformat/file.c | |
parent | 225e84e74544062706c0159ec0737b0e1d40915f (diff) | |
download | ffmpeg-2758cdedfb7ac61f8b5e4861f99218b6fd43491d.tar.gz |
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.
Diffstat (limited to 'libavformat/file.c')
-rw-r--r-- | libavformat/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index b54db9aea6..4f581cfae7 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -144,7 +144,7 @@ static int file_close(URLContext *h) return close(c->fd); } -URLProtocol ff_file_protocol = { +const URLProtocol ff_file_protocol = { .name = "file", .url_open = file_open, .url_read = file_read, @@ -184,7 +184,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) return 0; } -URLProtocol ff_pipe_protocol = { +const URLProtocol ff_pipe_protocol = { .name = "pipe", .url_open = pipe_open, .url_read = file_read, |