[FFmpeg-devel] [PATCH 3/3] libutvideo: use named struct initializers.

Clément Bœsch ubitux at gmail.com
Tue Nov 15 00:19:09 CET 2011


On Tue, Nov 15, 2011 at 12:17:33AM +0100, Clément Bœsch wrote:
> ---
>  libavcodec/libutvideo.cpp |   22 ++++++++--------------
>  1 files changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/libavcodec/libutvideo.cpp b/libavcodec/libutvideo.cpp
> index 7126c36..3ba762f 100644
> --- a/libavcodec/libutvideo.cpp
> +++ b/libavcodec/libutvideo.cpp
> @@ -188,18 +188,12 @@ static av_cold int utvideo_decode_close(AVCodecContext *avctx)
>  }
>  
>  AVCodec ff_libutvideo_decoder = {
> -    "libutvideo",
> -    AVMEDIA_TYPE_VIDEO,
> -    CODEC_ID_UTVIDEO,
> -    sizeof(UtVideoContext),
> -    utvideo_decode_init,
> -    NULL,
> -    utvideo_decode_close,
> -    utvideo_decode_frame,
> -    NULL,
> -    NULL,
> -    NULL,
> -    NULL,
> -    NULL,
> -    NULL_IF_CONFIG_SMALL("Ut Video"),
> +    .name           = "libutvideo",
> +    .long_name      = NULL_IF_CONFIG_SMALL("Ut Video"),
> +    .type           = AVMEDIA_TYPE_VIDEO,
> +    .id             = CODEC_ID_UTVIDEO,
> +    .priv_data_size = sizeof(UtVideoContext),
> +    .init           = utvideo_decode_init,
> +    .close          = utvideo_decode_close,
> +    .decode         = utvideo_decode_frame,
>  };

I realized this is common with the other c++ wrapper and wonder if it
actually works with any c++ compiler. If anyone can test that, that would
be welcome :)

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111115/9da7da32/attachment.asc>


More information about the ffmpeg-devel mailing list