History

lavf: use designated initializers for AVClasses.

Anton Khirnov committed 15 years ago

Commit 4a7a1b71 parent 5a43bd57 files · +34 −14Browse files

Unified · Split

7 files
  1. libavformat/avio.c +6 −2
  2. libavformat/crypto.c +4 −1
  3. libavformat/http.c +4 −1
  4. libavformat/mp3enc.c +4 −4
  5. libavformat/mpegtsenc.c +4 −4
  6. libavformat/options.c +6 −1
  7. libavformat/spdifenc.c +6 −1
libavformat/avio.c+6−2
@@ -40,8 +40,12 @@ static const char *urlcontext_to_name(void *ptr) · 39 unmodified lines
4040 else return "NULL";
4141 }
4242 static const AVOption options[] = {{NULL}};
43−static const AVClass urlcontext_class =
44− { "URLContext", urlcontext_to_name, options, LIBAVUTIL_VERSION_INT };
43+static const AVClass urlcontext_class = {
44+ .class_name = "URLContext",
45+ .item_name = urlcontext_to_name,
46+ .option = options,
47+ .version = LIBAVUTIL_VERSION_INT,
48+};
4549 /*@}*/
4650
4751 static int default_interrupt_cb(void);
libavformat/crypto.c+4−1
@@ -52,7 +52,10 @@ static const AVOption options[] = { · 51 unmodified lines
5252 };
5353
5454 static const AVClass crypto_class = {
55− "crypto", av_default_item_name, options, LIBAVUTIL_VERSION_INT
55+ .class_name = "crypto",
56+ .item_name = av_default_item_name,
57+ .option = options,
58+ .version = LIBAVUTIL_VERSION_INT,
5659 };
5760
5861 static int crypto_open(URLContext *h, const char *uri, int flags)
libavformat/http.c+4−1
@@ -58,7 +58,10 @@ static const AVOption options[] = { · 57 unmodified lines
5858 {NULL}
5959 };
6060 static const AVClass httpcontext_class = {
61− "HTTP", av_default_item_name, options, LIBAVUTIL_VERSION_INT
61+ .class_name = "HTTP",
62+ .item_name = av_default_item_name,
63+ .option = options,
64+ .version = LIBAVUTIL_VERSION_INT,
6265 };
6366
6467 static int http_connect(URLContext *h, const char *path, const char *hoststr,
libavformat/mp3enc.c+4−4
@@ -166,10 +166,10 @@ static const AVOption options[] = { · 165 unmodified lines
166166 };
167167
168168 static const AVClass mp3_muxer_class = {
169− "MP3 muxer",
170− av_default_item_name,
171− options,
172− LIBAVUTIL_VERSION_INT,
169+ .class_name = "MP3 muxer",
170+ .item_name = av_default_item_name,
171+ .option = options,
172+ .version = LIBAVUTIL_VERSION_INT,
173173 };
174174
175175 static int id3v2_check_write_tag(AVFormatContext *s, AVMetadataTag *t, const char table[][4],
libavformat/mpegtsenc.c+4−4
@@ -89,10 +89,10 @@ static const AVOption options[] = { · 88 unmodified lines
8989 };
9090
9191 static const AVClass mpegts_muxer_class = {
92− "MPEGTS muxer",
93− av_default_item_name,
94− options,
95− LIBAVUTIL_VERSION_INT,
92+ .class_name = "MPEGTS muxer",
93+ .item_name = av_default_item_name,
94+ .option = options,
95+ .version = LIBAVUTIL_VERSION_INT,
9696 };
9797
9898 /* NOTE: 4 bytes must be left at the end for the crc32 */
libavformat/options.c+6−1
@@ -64,7 +64,12 @@ static const AVOption options[]={ · 63 unmodified lines
6464 #undef D
6565 #undef DEFAULT
6666
67−static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options, LIBAVUTIL_VERSION_INT };
67+static const AVClass av_format_context_class = {
68+ .class_name = "AVFormatContext",
69+ .item_name = format_to_name,
70+ .option = options,
71+ .version = LIBAVUTIL_VERSION_INT,
72+};
6873
6974 static void avformat_get_context_defaults(AVFormatContext *s)
7075 {
libavformat/spdifenc.c+6−1
@@ -93,7 +93,12 @@ static const AVOption options[] = { · 92 unmodified lines
9393 { NULL },
9494 };
9595
96−static const AVClass class = { "spdif", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
96+static const AVClass class = {
97+ .class_name = "spdif",
98+ .item_name = av_default_item_name,
99+ .option = options,
100+ .version = LIBAVUTIL_VERSION_INT,
101+};
97102
98103 static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
99104 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t