[FFmpeg-cvslog] lavf: use designated initializers for AVClasses.
Anton Khirnov
git at videolan.org
Sun May 1 00:27:05 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Apr 29 11:30:02 2011 +0200| [4a7a1b7def03051e16a3ffbbe51d41f227aea0fd] | committer: Anton Khirnov
lavf: use designated initializers for AVClasses.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a7a1b7def03051e16a3ffbbe51d41f227aea0fd
---
libavformat/avio.c | 8 ++++++--
libavformat/crypto.c | 5 ++++-
libavformat/http.c | 5 ++++-
libavformat/mp3enc.c | 8 ++++----
libavformat/mpegtsenc.c | 8 ++++----
libavformat/options.c | 7 ++++++-
libavformat/spdifenc.c | 7 ++++++-
7 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 0702aff..e7bf616 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -40,8 +40,12 @@ static const char *urlcontext_to_name(void *ptr)
else return "NULL";
}
static const AVOption options[] = {{NULL}};
-static const AVClass urlcontext_class =
- { "URLContext", urlcontext_to_name, options, LIBAVUTIL_VERSION_INT };
+static const AVClass urlcontext_class = {
+ .class_name = "URLContext",
+ .item_name = urlcontext_to_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
/*@}*/
static int default_interrupt_cb(void);
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index fecc2c9..789a4d1 100644
--- a/libavformat/crypto.c
+++ b/libavformat/crypto.c
@@ -52,7 +52,10 @@ static const AVOption options[] = {
};
static const AVClass crypto_class = {
- "crypto", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+ .class_name = "crypto",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static int crypto_open(URLContext *h, const char *uri, int flags)
diff --git a/libavformat/http.c b/libavformat/http.c
index 7d59152..9cef0a6 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -58,7 +58,10 @@ static const AVOption options[] = {
{NULL}
};
static const AVClass httpcontext_class = {
- "HTTP", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+ .class_name = "HTTP",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static int http_connect(URLContext *h, const char *path, const char *hoststr,
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index d46e67b..0a2d04c 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -166,10 +166,10 @@ static const AVOption options[] = {
};
static const AVClass mp3_muxer_class = {
- "MP3 muxer",
- av_default_item_name,
- options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "MP3 muxer",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
static int id3v2_check_write_tag(AVFormatContext *s, AVMetadataTag *t, const char table[][4],
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index bf66aa0..d8fe5ed 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -89,10 +89,10 @@ static const AVOption options[] = {
};
static const AVClass mpegts_muxer_class = {
- "MPEGTS muxer",
- av_default_item_name,
- options,
- LIBAVUTIL_VERSION_INT,
+ .class_name = "MPEGTS muxer",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
};
/* NOTE: 4 bytes must be left at the end for the crc32 */
diff --git a/libavformat/options.c b/libavformat/options.c
index 2192ff6..1e5e506 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -64,7 +64,12 @@ static const AVOption options[]={
#undef D
#undef DEFAULT
-static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options, LIBAVUTIL_VERSION_INT };
+static const AVClass av_format_context_class = {
+ .class_name = "AVFormatContext",
+ .item_name = format_to_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
static void avformat_get_context_defaults(AVFormatContext *s)
{
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index 35c7b16..fed482c 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -93,7 +93,12 @@ static const AVOption options[] = {
{ NULL },
};
-static const AVClass class = { "spdif", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
+static const AVClass class = {
+ .class_name = "spdif",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
{
More information about the ffmpeg-cvslog
mailing list