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
40 else return "NULL";40 else return "NULL";
41}41}
42static const AVOption options[] = {{NULL}};42static const AVOption options[] = {{NULL}};
43static const AVClass urlcontext_class =43static const AVClass urlcontext_class = {
44 { "URLContext", urlcontext_to_name, options, LIBAVUTIL_VERSION_INT };44 .class_name = "URLContext",
45 .item_name = urlcontext_to_name,
46 .option = options,
47 .version = LIBAVUTIL_VERSION_INT,
48};
45/*@}*/49/*@}*/
46 50
47static int default_interrupt_cb(void);51static int default_interrupt_cb(void);
libavformat/crypto.c+4−1
@@ -52,7 +52,10 @@ static const AVOption options[] = { · 51 unmodified lines
52};52};
53 53
54static const AVClass crypto_class = {54static const AVClass crypto_class = {
55 "crypto", av_default_item_name, options, LIBAVUTIL_VERSION_INT55 .class_name = "crypto",
56 .item_name = av_default_item_name,
57 .option = options,
58 .version = LIBAVUTIL_VERSION_INT,
56};59};
57 60
58static int crypto_open(URLContext *h, const char *uri, int flags)61static 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
58{NULL}58{NULL}
59};59};
60static const AVClass httpcontext_class = {60static const AVClass httpcontext_class = {
61 "HTTP", av_default_item_name, options, LIBAVUTIL_VERSION_INT61 .class_name = "HTTP",
62 .item_name = av_default_item_name,
63 .option = options,
64 .version = LIBAVUTIL_VERSION_INT,
62};65};
63 66
64static int http_connect(URLContext *h, const char *path, const char *hoststr,67static 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
166};166};
167 167
168static const AVClass mp3_muxer_class = {168static const AVClass mp3_muxer_class = {
169 "MP3 muxer",169 .class_name = "MP3 muxer",
170 av_default_item_name,170 .item_name = av_default_item_name,
171 options,171 .option = options,
172 LIBAVUTIL_VERSION_INT,172 .version = LIBAVUTIL_VERSION_INT,
173};173};
174 174
175static int id3v2_check_write_tag(AVFormatContext *s, AVMetadataTag *t, const char table[][4],175static 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
89};89};
90 90
91static const AVClass mpegts_muxer_class = {91static const AVClass mpegts_muxer_class = {
92 "MPEGTS muxer",92 .class_name = "MPEGTS muxer",
93 av_default_item_name,93 .item_name = av_default_item_name,
94 options,94 .option = options,
95 LIBAVUTIL_VERSION_INT,95 .version = LIBAVUTIL_VERSION_INT,
96};96};
97 97
98/* NOTE: 4 bytes must be left at the end for the crc32 */98/* 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
64#undef D64#undef D
65#undef DEFAULT65#undef DEFAULT
66 66
67static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options, LIBAVUTIL_VERSION_INT };67static 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};
68 73
69static void avformat_get_context_defaults(AVFormatContext *s)74static void avformat_get_context_defaults(AVFormatContext *s)
70{75{
libavformat/spdifenc.c+6−1
@@ -93,7 +93,12 @@ static const AVOption options[] = { · 92 unmodified lines
93{ NULL },93{ NULL },
94};94};
95 95
96static const AVClass class = { "spdif", av_default_item_name, options, LIBAVUTIL_VERSION_INT };96static const AVClass class = {
97 .class_name = "spdif",
98 .item_name = av_default_item_name,
99 .option = options,
100 .version = LIBAVUTIL_VERSION_INT,
101};
97 102
98static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)103static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
99{104{

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