diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-22 02:59:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-22 03:00:06 +0200 |
commit | ab7c67905d1a97c274b24e268798d2f5fa2f6220 (patch) | |
tree | 9652ecc5ed4ab43b887faf7ea1ddce2f35af7ca7 /libavformat | |
parent | e621e6cac6dd99e069be9de694c2f9d33357a27d (diff) | |
parent | 389380c27915b0505fed538cd54c035c891fabd9 (diff) | |
download | ffmpeg-ab7c67905d1a97c274b24e268798d2f5fa2f6220.tar.gz |
Merge commit '389380c27915b0505fed538cd54c035c891fabd9'
* commit '389380c27915b0505fed538cd54c035c891fabd9':
http: Do move the class instantiation in the conditional block
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/http.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 75845ab67f..2bac935e8c 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -120,16 +120,6 @@ static const AVOption options[] = { {"method", "Override the HTTP method", OFFSET(method), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E, }, {NULL} }; -#define HTTP_CLASS(flavor)\ -static const AVClass flavor ## _context_class = {\ - .class_name = #flavor,\ - .item_name = av_default_item_name,\ - .option = options,\ - .version = LIBAVUTIL_VERSION_INT,\ -} - -HTTP_CLASS(http); -HTTP_CLASS(https); static int http_connect(URLContext *h, const char *path, const char *local_path, const char *hoststr, const char *auth, @@ -1102,7 +1092,17 @@ http_get_file_handle(URLContext *h) return ffurl_get_file_handle(s->hd); } +#define HTTP_CLASS(flavor)\ +static const AVClass flavor ## _context_class = {\ + .class_name = #flavor,\ + .item_name = av_default_item_name,\ + .option = options,\ + .version = LIBAVUTIL_VERSION_INT,\ +} + #if CONFIG_HTTP_PROTOCOL +HTTP_CLASS(http); + URLProtocol ff_http_protocol = { .name = "http", .url_open2 = http_open, @@ -1118,6 +1118,8 @@ URLProtocol ff_http_protocol = { }; #endif #if CONFIG_HTTPS_PROTOCOL +HTTP_CLASS(https); + URLProtocol ff_https_protocol = { .name = "https", .url_open2 = http_open, |