summaryrefslogtreecommitdiff
path: root/libavcodec/dv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-07-17 12:54:31 +0200
committerAnton Khirnov <anton@khirnov.net>2011-07-29 08:42:34 +0200
commitec6402b7c595c3ceed6d1b8c1b75c6aa8336e052 (patch)
treeb0ac16ae01c2bb355766ae164a1b44fc88617750 /libavcodec/dv.c
parent3ad168412600e16dfaa4b41b21322a82a8535990 (diff)
downloadffmpeg-ec6402b7c595c3ceed6d1b8c1b75c6aa8336e052.tar.gz
lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r--libavcodec/dv.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index a35bb2f2ed..976242235b 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -1279,12 +1279,12 @@ static int dvvideo_close(AVCodecContext *c)
#if CONFIG_DVVIDEO_ENCODER
AVCodec ff_dvvideo_encoder = {
- "dvvideo",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_DVVIDEO,
- sizeof(DVVideoContext),
- dvvideo_init_encoder,
- dvvideo_encode_frame,
+ .name = "dvvideo",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_DVVIDEO,
+ .priv_data_size = sizeof(DVVideoContext),
+ .init = dvvideo_init_encoder,
+ .encode = dvvideo_encode_frame,
.capabilities = CODEC_CAP_SLICE_THREADS,
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_YUV411P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
@@ -1293,16 +1293,14 @@ AVCodec ff_dvvideo_encoder = {
#if CONFIG_DVVIDEO_DECODER
AVCodec ff_dvvideo_decoder = {
- "dvvideo",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_DVVIDEO,
- sizeof(DVVideoContext),
- dvvideo_init,
- NULL,
- dvvideo_close,
- dvvideo_decode_frame,
- CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
- NULL,
+ .name = "dvvideo",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_DVVIDEO,
+ .priv_data_size = sizeof(DVVideoContext),
+ .init = dvvideo_init,
+ .close = dvvideo_close,
+ .decode = dvvideo_decode_frame,
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
.max_lowres = 3,
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
};