diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-09-23 20:50:11 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-09-24 12:11:17 +0200 |
commit | 30b4ee7901ec5dbe24f1c75c0c0b43ba551c858b (patch) | |
tree | 1280949167f244216ee5ef382be0928a1abbe4e2 /libavformat | |
parent | 9ff6d0791b220d80844b45c9217113306a50a6cc (diff) | |
download | ffmpeg-30b4ee7901ec5dbe24f1c75c0c0b43ba551c858b.tar.gz |
Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/daud.c | 21 | ||||
-rw-r--r-- | libavformat/idroqenc.c | 19 | ||||
-rw-r--r-- | libavformat/pcmdec.c | 38 | ||||
-rw-r--r-- | libavformat/pcmenc.c | 21 | ||||
-rw-r--r-- | libavformat/txd.c | 14 |
5 files changed, 50 insertions, 63 deletions
diff --git a/libavformat/daud.c b/libavformat/daud.c index 9421d18a3b..6a48818c84 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -80,17 +80,14 @@ AVInputFormat ff_daud_demuxer = { #endif #if CONFIG_DAUD_MUXER -AVOutputFormat ff_daud_muxer = -{ - "daud", - NULL_IF_CONFIG_SMALL("D-Cinema audio format"), - NULL, - "302", - 0, - CODEC_ID_PCM_S24DAUD, - CODEC_ID_NONE, - daud_write_header, - daud_write_packet, - .flags= AVFMT_NOTIMESTAMPS, +AVOutputFormat ff_daud_muxer = { + .name = "daud", + .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio format"), + .extensions = "302", + .audio_codec = CODEC_ID_PCM_S24DAUD, + .video_codec = CODEC_ID_NONE, + .write_header = daud_write_header, + .write_packet = daud_write_packet, + .flags = AVFMT_NOTIMESTAMPS, }; #endif diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c index 688d58d1ab..266a731cc3 100644 --- a/libavformat/idroqenc.c +++ b/libavformat/idroqenc.c @@ -35,15 +35,12 @@ static int roq_write_header(struct AVFormatContext *s) return 0; } -AVOutputFormat ff_roq_muxer = -{ - "RoQ", - NULL_IF_CONFIG_SMALL("raw id RoQ format"), - NULL, - "roq", - 0, - CODEC_ID_ROQ_DPCM, - CODEC_ID_ROQ, - roq_write_header, - ff_raw_write_packet, +AVOutputFormat ff_roq_muxer = { + .name = "RoQ", + .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ format"), + .extensions = "roq", + .audio_codec = CODEC_ID_ROQ_DPCM, + .video_codec = CODEC_ID_ROQ, + .write_header = roq_write_header, + .write_packet = ff_raw_write_packet, }; diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 90799dd664..22023320b8 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -54,26 +54,24 @@ static const AVOption pcm_options[] = { { NULL }, }; -#define PCMDEF(name, long_name, ext, codec) \ -static const AVClass name ## _demuxer_class = {\ - .class_name = #name " demuxer",\ - .item_name = av_default_item_name,\ - .option = pcm_options,\ - .version = LIBAVUTIL_VERSION_INT,\ -};\ -AVInputFormat ff_pcm_ ## name ## _demuxer = {\ - #name,\ - NULL_IF_CONFIG_SMALL(long_name),\ - sizeof(RawAudioDemuxerContext),\ - NULL,\ - ff_raw_read_header,\ - raw_read_packet,\ - NULL,\ - pcm_read_seek,\ - .flags= AVFMT_GENERIC_INDEX,\ - .extensions = ext,\ - .value = codec,\ - .priv_class = &name ## _demuxer_class,\ +#define PCMDEF(name_, long_name_, ext, codec) \ +static const AVClass name_ ## _demuxer_class = { \ + .class_name = #name_ " demuxer", \ + .item_name = av_default_item_name, \ + .option = pcm_options, \ + .version = LIBAVUTIL_VERSION_INT, \ +}; \ +AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ + .name = #name_, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ + .priv_data_size = sizeof(RawAudioDemuxerContext), \ + .read_header = ff_raw_read_header, \ + .read_packet = raw_read_packet, \ + .read_seek = pcm_read_seek, \ + .flags = AVFMT_GENERIC_INDEX, \ + .extensions = ext, \ + .value = codec, \ + .priv_class = &name_ ## _demuxer_class, \ }; PCMDEF(f64be, "PCM 64 bit floating-point big-endian format", diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c index 928124e9b0..553df1f877 100644 --- a/libavformat/pcmenc.c +++ b/libavformat/pcmenc.c @@ -22,18 +22,15 @@ #include "avformat.h" #include "rawenc.h" -#define PCMDEF(name, long_name, ext, codec) \ -AVOutputFormat ff_pcm_ ## name ## _muxer = {\ - #name,\ - NULL_IF_CONFIG_SMALL(long_name),\ - NULL,\ - ext,\ - 0,\ - codec,\ - CODEC_ID_NONE,\ - NULL,\ - ff_raw_write_packet,\ - .flags= AVFMT_NOTIMESTAMPS,\ +#define PCMDEF(name_, long_name_, ext, codec) \ +AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ + .name = #name_, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ + .extensions = ext, \ + .audio_codec = codec, \ + .video_codec = CODEC_ID_NONE, \ + .write_packet = ff_raw_write_packet, \ + .flags = AVFMT_NOTIMESTAMPS, \ }; PCMDEF(f64be, "PCM 64 bit floating-point big-endian format", diff --git a/libavformat/txd.c b/libavformat/txd.c index 0a93b7c760..e6fae08aa0 100644 --- a/libavformat/txd.c +++ b/libavformat/txd.c @@ -90,12 +90,10 @@ next_chunk: return 0; } -AVInputFormat ff_txd_demuxer = -{ - "txd", - NULL_IF_CONFIG_SMALL("Renderware TeXture Dictionary"), - 0, - txd_probe, - txd_read_header, - txd_read_packet, +AVInputFormat ff_txd_demuxer = { + .name = "txd", + .long_name = NULL_IF_CONFIG_SMALL("Renderware TeXture Dictionary"), + .read_probe = txd_probe, + .read_header = txd_read_header, + .read_packet = txd_read_packet, }; |