diff options
author | Diego Biurrun <diego@biurrun.de> | 2017-06-10 16:45:06 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-06-12 11:01:10 +0200 |
commit | 97cfe1d8bd1968143e2ba9aa46ebe9504a835e24 (patch) | |
tree | e68f3a7dd9aa9b56cf6920890fe2f4caec6b98cd /libavutil | |
parent | 98ea98069b40c34aa7b762096f8f380012a7dd84 (diff) |
Convert all AVClass struct declarations to designated initializers.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/eval.c | 9 | ||||
-rw-r--r-- | libavutil/file.c | 8 | ||||
-rw-r--r-- | libavutil/imgutils.c | 9 | ||||
-rw-r--r-- | libavutil/tests/opt.c | 6 |
4 files changed, 25 insertions, 7 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index b5d71c6000..7d7c16e927 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -52,7 +52,14 @@ typedef struct Parser { double var[VARS]; } Parser; -static const AVClass class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(Parser,log_offset), offsetof(Parser,log_ctx) }; +static const AVClass class = { + .class_name = "Eval", + .item_name = av_default_item_name, + .option = NULL, + .version = LIBAVUTIL_VERSION_INT, + .log_level_offset_offset = offsetof(Parser, log_offset), + .parent_log_context_offset = offsetof(Parser, log_ctx), +}; static const int8_t si_prefixes['z' - 'E' + 1] = { ['y'-'E']= -24, diff --git a/libavutil/file.c b/libavutil/file.c index 18a110aeeb..05ed2479a2 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -42,8 +42,12 @@ typedef struct FileLogContext { } FileLogContext; static const AVClass file_log_ctx_class = { - "FILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, - offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx) + .class_name = "FILE", + .item_name = av_default_item_name, + .option = NULL, + .version = LIBAVUTIL_VERSION_INT, + .log_level_offset_offset = offsetof(FileLogContext, log_offset), + .parent_log_context_offset = offsetof(FileLogContext, log_ctx), }; int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 20d06ec175..84abb11656 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -219,7 +219,14 @@ typedef struct ImgUtils { void *log_ctx; } ImgUtils; -static const AVClass imgutils_class = { "IMGUTILS", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(ImgUtils, log_offset), offsetof(ImgUtils, log_ctx) }; +static const AVClass imgutils_class = { + .class_name = "IMGUTILS", + .item_name = av_default_item_name, + .option = NULL, + .version = LIBAVUTIL_VERSION_INT, + .log_level_offset_offset = offsetof(ImgUtils, log_offset), + .parent_log_context_offset = offsetof(ImgUtils, log_ctx), +}; int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx) { diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c index 350ce3d820..9ed9d2b6b1 100644 --- a/libavutil/tests/opt.c +++ b/libavutil/tests/opt.c @@ -59,9 +59,9 @@ static const char *test_get_name(void *ctx) } static const AVClass test_class = { - "TestContext", - test_get_name, - test_options + .class_name = "TestContext", + .item_name = test_get_name, + .option = test_options, }; int main(void) |