aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-11-01 20:05:09 -0300
committerJames Almer <jamrial@gmail.com>2017-11-01 20:05:09 -0300
commite621b1ca646a2f268797adc3194b694a852548d2 (patch)
tree3c9c029dd56f3abc6e7c28ec55566b5c65a7ef2c
parent3524c92950832705210e50eeafad002fe2d58be5 (diff)
parent97cfe1d8bd1968143e2ba9aa46ebe9504a835e24 (diff)
downloadffmpeg-e621b1ca646a2f268797adc3194b694a852548d2.tar.gz
Merge commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24'
* commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24': Convert all AVClass struct declarations to designated initializers. Merged-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/aacenc.c8
-rw-r--r--libavcodec/libfdk-aacdec.c5
-rw-r--r--libavcodec/libfdk-aacenc.c5
-rw-r--r--libavcodec/libopencore-amr.c5
-rw-r--r--libavcodec/libopenh264enc.c5
-rw-r--r--libavcodec/libvo-amrwbenc.c5
-rw-r--r--libavcodec/mpeg4videodec.c8
-rw-r--r--libavcodec/s302m.c8
-rw-r--r--libavcodec/v210dec.c8
-rw-r--r--libavutil/eval.c9
-rw-r--r--libavutil/file.c8
-rw-r--r--libavutil/file_open.c8
-rw-r--r--libavutil/imgutils.c7
-rw-r--r--libavutil/tests/opt.c6
14 files changed, 63 insertions, 32 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 11da260742..3efcbda403 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -1066,10 +1066,10 @@ static const AVOption aacenc_options[] = {
};
static const AVClass aacenc_class = {
- "AAC encoder",
- av_default_item_name,
- aacenc_options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "AAC encoder",
+ .item_name = av_default_item_name,
+ .option = aacenc_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static const AVCodecDefault aac_encode_defaults[] = {
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index 2857b9453f..a0110da62b 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -79,7 +79,10 @@ static const AVOption fdk_aac_dec_options[] = {
};
static const AVClass fdk_aac_dec_class = {
- "libfdk-aac decoder", av_default_item_name, fdk_aac_dec_options, LIBAVUTIL_VERSION_INT
+ .class_name = "libfdk-aac decoder",
+ .item_name = av_default_item_name,
+ .option = fdk_aac_dec_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static int get_stream_info(AVCodecContext *avctx)
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 0e2051b468..ca0f4bf722 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -54,7 +54,10 @@ static const AVOption aac_enc_options[] = {
};
static const AVClass aac_enc_class = {
- "libfdk_aac", av_default_item_name, aac_enc_options, LIBAVUTIL_VERSION_INT
+ .class_name = "libfdk_aac",
+ .item_name = av_default_item_name,
+ .option = aac_enc_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static const char *aac_get_error(AACENC_ERROR err)
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 8545ffe109..d509804315 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -183,7 +183,10 @@ static const AVOption options[] = {
};
static const AVClass amrnb_class = {
- "libopencore_amrnb", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+ .class_name = "libopencore_amrnb",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 9c22bf4f30..1152d0036f 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -75,7 +75,10 @@ static const AVOption options[] = {
};
static const AVClass class = {
- "libopenh264enc", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+ .class_name = "libvo_amrwbenc",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static av_cold int svc_encode_close(AVCodecContext *avctx)
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index 2a15650572..f756940879 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -46,7 +46,10 @@ static const AVOption options[] = {
};
static const AVClass amrwb_class = {
- "libvo_amrwbenc", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+ .class_name = "libvo_amrwbenc",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static int get_wb_bitrate_mode(int bitrate, void *log_ctx)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 0203503599..76247c3b8c 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2823,10 +2823,10 @@ static const AVOption mpeg4_options[] = {
};
static const AVClass mpeg4_class = {
- "MPEG4 Video Decoder",
- av_default_item_name,
- mpeg4_options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "MPEG4 Video Decoder",
+ .item_name = av_default_item_name,
+ .option = mpeg4_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_mpeg4_decoder = {
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 4350d97f0a..584b58e28e 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -212,10 +212,10 @@ static const AVOption s302m_options[] = {
};
static const AVClass s302m_class = {
- "SMPTE 302M Decoder",
- av_default_item_name,
- s302m_options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "SMPTE 302M Decoder",
+ .item_name = av_default_item_name,
+ .option = s302m_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_s302m_decoder = {
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 9af9af6797..99199ddc15 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -162,10 +162,10 @@ static const AVOption v210dec_options[] = {
};
static const AVClass v210dec_class = {
- "V210 Decoder",
- av_default_item_name,
- v210dec_options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "V210 Decoder",
+ .item_name = av_default_item_name,
+ .option = v210dec_options,
+ .version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_v210_decoder = {
diff --git a/libavutil/eval.c b/libavutil/eval.c
index b5f4ea2409..5da9a6d83b 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -57,7 +57,14 @@ typedef struct Parser {
double *var;
} Parser;
-static const AVClass eval_class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(Parser,log_offset), offsetof(Parser,log_ctx) };
+static const AVClass eval_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 struct {
double bin_val;
diff --git a/libavutil/file.c b/libavutil/file.c
index 7bdf6cde84..24a86c3f35 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/file_open.c b/libavutil/file_open.c
index 34070d933b..258bb3074e 100644
--- a/libavutil/file_open.c
+++ b/libavutil/file_open.c
@@ -99,8 +99,12 @@ typedef struct FileLogContext {
} FileLogContext;
static const AVClass file_log_ctx_class = {
- "TEMPFILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT,
- offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx)
+ .class_name = "TEMPFILE",
+ .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 avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx)
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 5005178804..5af4fc20a0 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -242,9 +242,10 @@ typedef struct ImgUtils {
} ImgUtils;
static const AVClass imgutils_class = {
- .class_name = "IMGUTILS",
- .item_name = av_default_item_name,
- .version = LIBAVUTIL_VERSION_INT,
+ .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),
};
diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c
index 568eb45668..f4cfa590aa 100644
--- a/libavutil/tests/opt.c
+++ b/libavutil/tests/opt.c
@@ -98,9 +98,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,
};
static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)