On Thu, 10 Nov 2011, Anton Khirnov wrote:
--- libavformat/http.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)diff --git a/libavformat/http.c b/libavformat/http.c index 52e1886..84300b1 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -56,13 +56,17 @@ static const AVOption options[] = { {"chunksize", "use chunked transfer-encoding for posts, -1 disables it, 0 enables it", OFFSET(chunksize), AV_OPT_TYPE_INT64, {.dbl = 0}, -1, 0 }, /* Default to 0, for chunked POSTs */ {NULL} }; -static const AVClass httpcontext_class = { - .class_name = "HTTP", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, +#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 *hoststr, const char *auth, int *new_location); @@ -519,7 +523,7 @@ URLProtocol ff_http_protocol = { .url_close = http_close, .url_get_file_handle = http_get_file_handle, .priv_data_size = sizeof(HTTPContext), - .priv_data_class = &httpcontext_class, + .priv_data_class = &http_context_class, }; #endif #if CONFIG_HTTPS_PROTOCOL @@ -532,6 +536,6 @@ URLProtocol ff_https_protocol = { .url_close = http_close, .url_get_file_handle = http_get_file_handle, .priv_data_size = sizeof(HTTPContext), - .priv_data_class = &httpcontext_class, + .priv_data_class = &https_context_class, }; #endif -- 1.7.7
Ok // Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
