Commit 5511ad14 authored by Anton Khirnov's avatar Anton Khirnov

lavc: use designated initialisers for parsers.

parent da249637
...@@ -61,9 +61,9 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1) ...@@ -61,9 +61,9 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
AVCodecParser ff_aac_parser = { AVCodecParser ff_aac_parser = {
{ CODEC_ID_AAC }, .codec_ids = { CODEC_ID_AAC },
sizeof(AACAC3ParseContext), .priv_data_size = sizeof(AACAC3ParseContext),
aac_parse_init, .parser_init = aac_parse_init,
ff_aac_ac3_parse, .parser_parse = ff_aac_ac3_parse,
ff_parse_close, .parser_close = ff_parse_close,
}; };
...@@ -174,9 +174,9 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1) ...@@ -174,9 +174,9 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
AVCodecParser ff_ac3_parser = { AVCodecParser ff_ac3_parser = {
{ CODEC_ID_AC3, CODEC_ID_EAC3 }, .codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 },
sizeof(AACAC3ParseContext), .priv_data_size = sizeof(AACAC3ParseContext),
ac3_parse_init, .parser_init = ac3_parse_init,
ff_aac_ac3_parse, .parser_parse = ff_aac_ac3_parse,
ff_parse_close, .parser_close = ff_parse_close,
}; };
...@@ -98,10 +98,9 @@ static int cavsvideo_parse(AVCodecParserContext *s, ...@@ -98,10 +98,9 @@ static int cavsvideo_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_cavsvideo_parser = { AVCodecParser ff_cavsvideo_parser = {
{ CODEC_ID_CAVS }, .codec_ids = { CODEC_ID_CAVS },
sizeof(ParseContext1), .priv_data_size = sizeof(ParseContext1),
NULL, .parser_parse = cavsvideo_parse,
cavsvideo_parse, .parser_close = ff_parse1_close,
ff_parse1_close, .split = ff_mpeg4video_split,
ff_mpeg4video_split,
}; };
...@@ -126,9 +126,9 @@ static int dca_parse(AVCodecParserContext * s, ...@@ -126,9 +126,9 @@ static int dca_parse(AVCodecParserContext * s,
} }
AVCodecParser ff_dca_parser = { AVCodecParser ff_dca_parser = {
{CODEC_ID_DTS}, .codec_ids = { CODEC_ID_DTS },
sizeof(DCAParseContext), .priv_data_size = sizeof(DCAParseContext),
dca_parse_init, .parser_init = dca_parse_init,
dca_parse, .parser_parse = dca_parse,
ff_parse_close, .parser_close = ff_parse_close,
}; };
...@@ -248,9 +248,8 @@ static void dirac_parse_close(AVCodecParserContext *s) ...@@ -248,9 +248,8 @@ static void dirac_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dirac_parser = { AVCodecParser ff_dirac_parser = {
{ CODEC_ID_DIRAC }, .codec_ids = { CODEC_ID_DIRAC },
sizeof(DiracParseContext), .priv_data_size = sizeof(DiracParseContext),
NULL, .parser_parse = dirac_parse,
dirac_parse, .parser_close = dirac_parse_close,
dirac_parse_close,
}; };
...@@ -87,9 +87,8 @@ static int dnxhd_parse(AVCodecParserContext *s, ...@@ -87,9 +87,8 @@ static int dnxhd_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_dnxhd_parser = { AVCodecParser ff_dnxhd_parser = {
{ CODEC_ID_DNXHD }, .codec_ids = { CODEC_ID_DNXHD },
sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
NULL, .parser_parse = dnxhd_parse,
dnxhd_parse, .parser_close = ff_parse_close,
ff_parse_close,
}; };
...@@ -172,9 +172,9 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s) ...@@ -172,9 +172,9 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dvbsub_parser = { AVCodecParser ff_dvbsub_parser = {
{ CODEC_ID_DVB_SUBTITLE }, .codec_ids = { CODEC_ID_DVB_SUBTITLE },
sizeof(DVBSubParseContext), .priv_data_size = sizeof(DVBSubParseContext),
dvbsub_parse_init, .parser_init = dvbsub_parse_init,
dvbsub_parse, .parser_parse = dvbsub_parse,
dvbsub_parse_close, .parser_close = dvbsub_parse_close,
}; };
...@@ -77,9 +77,9 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s) ...@@ -77,9 +77,9 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dvdsub_parser = { AVCodecParser ff_dvdsub_parser = {
{ CODEC_ID_DVD_SUBTITLE }, .codec_ids = { CODEC_ID_DVD_SUBTITLE },
sizeof(DVDSubParseContext), .priv_data_size = sizeof(DVDSubParseContext),
dvdsub_parse_init, .parser_init = dvdsub_parse_init,
dvdsub_parse, .parser_parse = dvdsub_parse,
dvdsub_parse_close, .parser_close = dvdsub_parse_close,
}; };
...@@ -674,9 +674,9 @@ static void flac_parse_close(AVCodecParserContext *c) ...@@ -674,9 +674,9 @@ static void flac_parse_close(AVCodecParserContext *c)
} }
AVCodecParser ff_flac_parser = { AVCodecParser ff_flac_parser = {
{ CODEC_ID_FLAC }, .codec_ids = { CODEC_ID_FLAC },
sizeof(FLACParseContext), .priv_data_size = sizeof(FLACParseContext),
flac_parse_init, .parser_init = flac_parse_init,
flac_parse, .parser_parse = flac_parse,
flac_parse_close, .parser_close = flac_parse_close,
}; };
...@@ -82,9 +82,8 @@ static int h261_parse(AVCodecParserContext *s, ...@@ -82,9 +82,8 @@ static int h261_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_h261_parser = { AVCodecParser ff_h261_parser = {
{ CODEC_ID_H261 }, .codec_ids = { CODEC_ID_H261 },
sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
NULL, .parser_parse = h261_parse,
h261_parse, .parser_close = ff_parse_close,
ff_parse_close,
}; };
...@@ -84,9 +84,8 @@ static int h263_parse(AVCodecParserContext *s, ...@@ -84,9 +84,8 @@ static int h263_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_h263_parser = { AVCodecParser ff_h263_parser = {
{ CODEC_ID_H263 }, .codec_ids = { CODEC_ID_H263 },
sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
NULL, .parser_parse = h263_parse,
h263_parse, .parser_close = ff_parse_close,
ff_parse_close,
}; };
...@@ -334,10 +334,10 @@ static int init(AVCodecParserContext *s) ...@@ -334,10 +334,10 @@ static int init(AVCodecParserContext *s)
} }
AVCodecParser ff_h264_parser = { AVCodecParser ff_h264_parser = {
{ CODEC_ID_H264 }, .codec_ids = { CODEC_ID_H264 },
sizeof(H264Context), .priv_data_size = sizeof(H264Context),
init, .parser_init = init,
h264_parse, .parser_parse = h264_parse,
close, .parser_close = close,
h264_split, .split = h264_split,
}; };
...@@ -106,9 +106,8 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, ...@@ -106,9 +106,8 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
} }
AVCodecParser ff_aac_latm_parser = { AVCodecParser ff_aac_latm_parser = {
{ CODEC_ID_AAC_LATM }, .codec_ids = { CODEC_ID_AAC_LATM },
sizeof(LATMParseContext), .priv_data_size = sizeof(LATMParseContext),
NULL, .parser_parse = latm_parse,
latm_parse, .parser_close = ff_parse_close
ff_parse_close
}; };
...@@ -97,9 +97,8 @@ static int jpeg_parse(AVCodecParserContext *s, ...@@ -97,9 +97,8 @@ static int jpeg_parse(AVCodecParserContext *s,
AVCodecParser ff_mjpeg_parser = { AVCodecParser ff_mjpeg_parser = {
{ CODEC_ID_MJPEG }, .codec_ids = { CODEC_ID_MJPEG },
sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
NULL, .parser_parse = jpeg_parse,
jpeg_parse, .parser_close = ff_parse_close,
ff_parse_close,
}; };
...@@ -345,9 +345,9 @@ lost_sync: ...@@ -345,9 +345,9 @@ lost_sync:
} }
AVCodecParser ff_mlp_parser = { AVCodecParser ff_mlp_parser = {
{ CODEC_ID_MLP, CODEC_ID_TRUEHD }, .codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD },
sizeof(MLPParseContext), .priv_data_size = sizeof(MLPParseContext),
mlp_init, .parser_init = mlp_init,
mlp_parse, .parser_parse = mlp_parse,
ff_parse_close, .parser_close = ff_parse_close,
}; };
...@@ -130,10 +130,10 @@ static int mpeg4video_parse(AVCodecParserContext *s, ...@@ -130,10 +130,10 @@ static int mpeg4video_parse(AVCodecParserContext *s,
AVCodecParser ff_mpeg4video_parser = { AVCodecParser ff_mpeg4video_parser = {
{ CODEC_ID_MPEG4 }, .codec_ids = { CODEC_ID_MPEG4 },
sizeof(ParseContext1), .priv_data_size = sizeof(ParseContext1),
mpeg4video_parse_init, .parser_init = mpeg4video_parse_init,
mpeg4video_parse, .parser_parse = mpeg4video_parse,
ff_parse1_close, .parser_close = ff_parse1_close,
ff_mpeg4video_split, .split = ff_mpeg4video_split,
}; };
...@@ -100,9 +100,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1, ...@@ -100,9 +100,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
AVCodecParser ff_mpegaudio_parser = { AVCodecParser ff_mpegaudio_parser = {
{ CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 }, .codec_ids = { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 },
sizeof(MpegAudioParseContext), .priv_data_size = sizeof(MpegAudioParseContext),
NULL, .parser_parse = mpegaudio_parse,
mpegaudio_parse, .parser_close = ff_parse_close,
ff_parse_close,
}; };
...@@ -174,10 +174,9 @@ static int mpegvideo_split(AVCodecContext *avctx, ...@@ -174,10 +174,9 @@ static int mpegvideo_split(AVCodecContext *avctx,
} }
AVCodecParser ff_mpegvideo_parser = { AVCodecParser ff_mpegvideo_parser = {
{ CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO }, .codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
sizeof(ParseContext1), .priv_data_size = sizeof(ParseContext1),
NULL, .parser_parse = mpegvideo_parse,
mpegvideo_parse, .parser_close = ff_parse1_close,
ff_parse1_close, .split = mpegvideo_split,
mpegvideo_split,
}; };
...@@ -84,9 +84,9 @@ retry: ...@@ -84,9 +84,9 @@ retry:
} }
AVCodecParser ff_pnm_parser = { AVCodecParser ff_pnm_parser = {
{ CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM, CODEC_ID_PBM, CODEC_ID_PAM}, .codec_ids = { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM,
sizeof(ParseContext), CODEC_ID_PBM, CODEC_ID_PAM },
NULL, .priv_data_size = sizeof(ParseContext),
pnm_parse, .parser_parse = pnm_parse,
ff_parse_close, .parser_close = ff_parse_close,
}; };
...@@ -78,18 +78,16 @@ static int rv34_parse(AVCodecParserContext *s, ...@@ -78,18 +78,16 @@ static int rv34_parse(AVCodecParserContext *s,
#ifdef CONFIG_RV30_PARSER #ifdef CONFIG_RV30_PARSER
AVCodecParser ff_rv30_parser = { AVCodecParser ff_rv30_parser = {
{ CODEC_ID_RV30 }, .codec_ids = { CODEC_ID_RV30 },
sizeof(RV34ParseContext), .priv_data_size = sizeof(RV34ParseContext),
NULL, .parser_parse = rv34_parse,
rv34_parse,
}; };
#endif #endif
#ifdef CONFIG_RV40_PARSER #ifdef CONFIG_RV40_PARSER
AVCodecParser ff_rv40_parser = { AVCodecParser ff_rv40_parser = {
{ CODEC_ID_RV40 }, .codec_ids = { CODEC_ID_RV40 },
sizeof(RV34ParseContext), .priv_data_size = sizeof(RV34ParseContext),
NULL, .parser_parse = rv34_parse,
rv34_parse,
}; };
#endif #endif
...@@ -185,10 +185,9 @@ static int vc1_split(AVCodecContext *avctx, ...@@ -185,10 +185,9 @@ static int vc1_split(AVCodecContext *avctx,
} }
AVCodecParser ff_vc1_parser = { AVCodecParser ff_vc1_parser = {
{ CODEC_ID_VC1 }, .codec_ids = { CODEC_ID_VC1 },
sizeof(VC1ParseContext), .priv_data_size = sizeof(VC1ParseContext),
NULL, .parser_parse = vc1_parse,
vc1_parse, .parser_close = ff_parse1_close,
ff_parse1_close, .split = vc1_split,
vc1_split,
}; };
...@@ -36,9 +36,7 @@ static int parse(AVCodecParserContext *s, ...@@ -36,9 +36,7 @@ static int parse(AVCodecParserContext *s,
} }
AVCodecParser ff_vp3_parser = { AVCodecParser ff_vp3_parser = {
{ CODEC_ID_THEORA, CODEC_ID_VP3, .codec_ids = { CODEC_ID_THEORA, CODEC_ID_VP3, CODEC_ID_VP6,
CODEC_ID_VP6, CODEC_ID_VP6F, CODEC_ID_VP6A }, CODEC_ID_VP6F, CODEC_ID_VP6A },
0, .parser_parse = parse,
NULL,
parse,
}; };
...@@ -33,8 +33,6 @@ static int parse(AVCodecParserContext *s, ...@@ -33,8 +33,6 @@ static int parse(AVCodecParserContext *s,
} }
AVCodecParser ff_vp8_parser = { AVCodecParser ff_vp8_parser = {
{ CODEC_ID_VP8 }, .codec_ids = { CODEC_ID_VP8 },
0, .parser_parse = parse,
NULL,
parse,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment