Commit e621b1ca authored by James Almer's avatar James Almer

Merge commit '97cfe1d8'

* commit '97cfe1d8':
  Convert all AVClass struct declarations to designated initializers.
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 3524c929 97cfe1d8
...@@ -1066,10 +1066,10 @@ static const AVOption aacenc_options[] = { ...@@ -1066,10 +1066,10 @@ static const AVOption aacenc_options[] = {
}; };
static const AVClass aacenc_class = { static const AVClass aacenc_class = {
"AAC encoder", .class_name = "AAC encoder",
av_default_item_name, .item_name = av_default_item_name,
aacenc_options, .option = aacenc_options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
static const AVCodecDefault aac_encode_defaults[] = { static const AVCodecDefault aac_encode_defaults[] = {
......
...@@ -79,7 +79,10 @@ static const AVOption fdk_aac_dec_options[] = { ...@@ -79,7 +79,10 @@ static const AVOption fdk_aac_dec_options[] = {
}; };
static const AVClass fdk_aac_dec_class = { 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) static int get_stream_info(AVCodecContext *avctx)
......
...@@ -54,7 +54,10 @@ static const AVOption aac_enc_options[] = { ...@@ -54,7 +54,10 @@ static const AVOption aac_enc_options[] = {
}; };
static const AVClass aac_enc_class = { 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) static const char *aac_get_error(AACENC_ERROR err)
......
...@@ -183,7 +183,10 @@ static const AVOption options[] = { ...@@ -183,7 +183,10 @@ static const AVOption options[] = {
}; };
static const AVClass amrnb_class = { 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) static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
......
...@@ -75,7 +75,10 @@ static const AVOption options[] = { ...@@ -75,7 +75,10 @@ static const AVOption options[] = {
}; };
static const AVClass class = { 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) static av_cold int svc_encode_close(AVCodecContext *avctx)
......
...@@ -46,7 +46,10 @@ static const AVOption options[] = { ...@@ -46,7 +46,10 @@ static const AVOption options[] = {
}; };
static const AVClass amrwb_class = { 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) static int get_wb_bitrate_mode(int bitrate, void *log_ctx)
......
...@@ -2823,10 +2823,10 @@ static const AVOption mpeg4_options[] = { ...@@ -2823,10 +2823,10 @@ static const AVOption mpeg4_options[] = {
}; };
static const AVClass mpeg4_class = { static const AVClass mpeg4_class = {
"MPEG4 Video Decoder", .class_name = "MPEG4 Video Decoder",
av_default_item_name, .item_name = av_default_item_name,
mpeg4_options, .option = mpeg4_options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
AVCodec ff_mpeg4_decoder = { AVCodec ff_mpeg4_decoder = {
......
...@@ -212,10 +212,10 @@ static const AVOption s302m_options[] = { ...@@ -212,10 +212,10 @@ static const AVOption s302m_options[] = {
}; };
static const AVClass s302m_class = { static const AVClass s302m_class = {
"SMPTE 302M Decoder", .class_name = "SMPTE 302M Decoder",
av_default_item_name, .item_name = av_default_item_name,
s302m_options, .option = s302m_options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
AVCodec ff_s302m_decoder = { AVCodec ff_s302m_decoder = {
......
...@@ -162,10 +162,10 @@ static const AVOption v210dec_options[] = { ...@@ -162,10 +162,10 @@ static const AVOption v210dec_options[] = {
}; };
static const AVClass v210dec_class = { static const AVClass v210dec_class = {
"V210 Decoder", .class_name = "V210 Decoder",
av_default_item_name, .item_name = av_default_item_name,
v210dec_options, .option = v210dec_options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
AVCodec ff_v210_decoder = { AVCodec ff_v210_decoder = {
......
...@@ -57,7 +57,14 @@ typedef struct Parser { ...@@ -57,7 +57,14 @@ typedef struct Parser {
double *var; double *var;
} Parser; } 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 { static const struct {
double bin_val; double bin_val;
......
...@@ -42,8 +42,12 @@ typedef struct FileLogContext { ...@@ -42,8 +42,12 @@ typedef struct FileLogContext {
} FileLogContext; } FileLogContext;
static const AVClass file_log_ctx_class = { static const AVClass file_log_ctx_class = {
"FILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, .class_name = "FILE",
offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx) .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, int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
......
...@@ -99,8 +99,12 @@ typedef struct FileLogContext { ...@@ -99,8 +99,12 @@ typedef struct FileLogContext {
} FileLogContext; } FileLogContext;
static const AVClass file_log_ctx_class = { static const AVClass file_log_ctx_class = {
"TEMPFILE", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, .class_name = "TEMPFILE",
offsetof(FileLogContext, log_offset), offsetof(FileLogContext, log_ctx) .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) int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx)
......
...@@ -242,9 +242,10 @@ typedef struct ImgUtils { ...@@ -242,9 +242,10 @@ typedef struct ImgUtils {
} ImgUtils; } ImgUtils;
static const AVClass imgutils_class = { static const AVClass imgutils_class = {
.class_name = "IMGUTILS", .class_name = "IMGUTILS",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.version = LIBAVUTIL_VERSION_INT, .option = NULL,
.version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(ImgUtils, log_offset), .log_level_offset_offset = offsetof(ImgUtils, log_offset),
.parent_log_context_offset = offsetof(ImgUtils, log_ctx), .parent_log_context_offset = offsetof(ImgUtils, log_ctx),
}; };
......
...@@ -98,9 +98,9 @@ static const char *test_get_name(void *ctx) ...@@ -98,9 +98,9 @@ static const char *test_get_name(void *ctx)
} }
static const AVClass test_class = { static const AVClass test_class = {
"TestContext", .class_name = "TestContext",
test_get_name, .item_name = test_get_name,
test_options .option = test_options,
}; };
static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl) static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment