On Fri, Jan 13, 2012 at 09:22:52PM +0000, Paul B Mahol wrote:
> ---
>  Changelog                |    1 +
>  doc/general.texi         |    2 +-
>  libavformat/Makefile     |    3 +-
>  libavformat/allformats.c |    2 +-
>  libavformat/smjpeg.c     |  159 ++---------------------------------------
>  libavformat/smjpeg.h     |   37 ++++++++++
>  libavformat/smjpegdec.c  |  177 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  libavformat/smjpegenc.c  |  149 ++++++++++++++++++++++++++++++++++++++
>  libavformat/version.h    |    2 +-
>  9 files changed, 375 insertions(+), 157 deletions(-)
>  create mode 100644 libavformat/smjpeg.h
>  create mode 100644 libavformat/smjpegdec.c
>  create mode 100644 libavformat/smjpegenc.c
> 
[...]
> +
> +    return 0;
> +}
> +
> +AVOutputFormat ff_smjpeg_muxer = {
> +    .name           = "smjpeg",
> +    .long_name      = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"),
> +    .priv_data_size = sizeof(SMJPEGMuxContext),
> +    .audio_codec    = CODEC_ID_PCM_S16LE,
> +    .video_codec    = CODEC_ID_MJPEG,
> +    .write_header   = smjpeg_write_header,
> +    .write_packet   = smjpeg_write_packet,
> +    .write_trailer  = smjpeg_write_trailer,
> +    .flags = AVFMT_GLOBALHEADER,
> +    .codec_tag = (const AVCodecTag *const []){
> ff_codec_smjpeg_video_tags, ff_codec_smjpeg_audio_tags, 0 },
> +};

You forgot to vertically align it.

Also it's better to be done in two steps indeed - spplitting out common stuff
and renaming demuxer and then adding muxer.

As a side note - those tags could be also defined in smjpeg.h so you can use
them by define name instead of MKTAG() in all places.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to