lavf: use designated initializers for AVClasses.

pull/2/head
Anton Khirnov 14 years ago
parent 13220b1856
commit f0029cbcf6
  1. 8
      libavformat/avio.c
  2. 5
      libavformat/crypto.c
  3. 5
      libavformat/http.c
  4. 8
      libavformat/mp3enc.c
  5. 8
      libavformat/mpegtsenc.c
  6. 7
      libavformat/options.c
  7. 7
      libavformat/spdifenc.c

@ -39,8 +39,12 @@ static const char *urlcontext_to_name(void *ptr)
else return "NULL"; else return "NULL";
} }
static const AVOption options[] = {{NULL}}; static const AVOption options[] = {{NULL}};
static const AVClass urlcontext_class = static const AVClass urlcontext_class = {
{ "URLContext", urlcontext_to_name, options, LIBAVUTIL_VERSION_INT }; .class_name = "URLContext",
.item_name = urlcontext_to_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
/*@}*/ /*@}*/
static int default_interrupt_cb(void); static int default_interrupt_cb(void);

@ -52,7 +52,10 @@ static const AVOption options[] = {
}; };
static const AVClass crypto_class = { 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) static int crypto_open(URLContext *h, const char *uri, int flags)

@ -58,7 +58,10 @@ static const AVOption options[] = {
{NULL} {NULL}
}; };
static const AVClass httpcontext_class = { 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, static int http_connect(URLContext *h, const char *path, const char *hoststr,

@ -167,10 +167,10 @@ static const AVOption options[] = {
}; };
static const AVClass mp3_muxer_class = { static const AVClass mp3_muxer_class = {
"MP3 muxer", .class_name = "MP3 muxer",
av_default_item_name, .item_name = av_default_item_name,
options, .option = options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
static int id3v2_check_write_tag(AVFormatContext *s, AVMetadataTag *t, const char table[][4], static int id3v2_check_write_tag(AVFormatContext *s, AVMetadataTag *t, const char table[][4],

@ -89,10 +89,10 @@ static const AVOption options[] = {
}; };
static const AVClass mpegts_muxer_class = { static const AVClass mpegts_muxer_class = {
"MPEGTS muxer", .class_name = "MPEGTS muxer",
av_default_item_name, .item_name = av_default_item_name,
options, .option = options,
LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
/* NOTE: 4 bytes must be left at the end for the crc32 */ /* NOTE: 4 bytes must be left at the end for the crc32 */

@ -64,7 +64,12 @@ static const AVOption options[]={
#undef D #undef D
#undef DEFAULT #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) static void avformat_get_context_defaults(AVFormatContext *s)
{ {

@ -93,7 +93,12 @@ static const AVOption options[] = {
{ NULL }, { 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) static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
{ {

Loading…
Cancel
Save