On Mon,  4 Nov 2013 17:05:52 +0100, Vittorio Giovara 
<[email protected]> wrote:
> From: Peter Holik <[email protected]>
> 
> ---
> Addressed Kostya's comments and added some minor comments.
> Vittorio
> 
>  libavcodec/Makefile     |    1 +
>  libavcodec/allcodecs.c  |    1 +
>  libavcodec/png_parser.c |  124 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 126 insertions(+)
>  create mode 100644 libavcodec/png_parser.c
> 
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 205359e..0b7eba6 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -648,6 +648,7 @@ OBJS-$(CONFIG_MPEGAUDIO_PARSER)        += 
> mpegaudio_parser.o \
>                                            mpegaudiodecheader.o 
> mpegaudiodata.o
>  OBJS-$(CONFIG_MPEGVIDEO_PARSER)        += mpegvideo_parser.o    \
>                                            mpeg12.o mpeg12data.o
> +OBJS-$(CONFIG_PNG_PARSER)              += png_parser.o
>  OBJS-$(CONFIG_PNM_PARSER)              += pnm_parser.o pnm.o
>  OBJS-$(CONFIG_RV30_PARSER)             += rv34_parser.o
>  OBJS-$(CONFIG_RV40_PARSER)             += rv34_parser.o
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index 6172466..bc81c49 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -460,6 +460,7 @@ void avcodec_register_all(void)
>      REGISTER_PARSER(MPEG4VIDEO,         mpeg4video);
>      REGISTER_PARSER(MPEGAUDIO,          mpegaudio);
>      REGISTER_PARSER(MPEGVIDEO,          mpegvideo);
> +    REGISTER_PARSER(PNG,                png);
>      REGISTER_PARSER(PNM,                pnm);
>      REGISTER_PARSER(RV30,               rv30);
>      REGISTER_PARSER(RV40,               rv40);
> diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c
> new file mode 100644
> index 0000000..00cbb82
> --- /dev/null
> +++ b/libavcodec/png_parser.c
> @@ -0,0 +1,124 @@
> +/*
> + * PNG parser
> + * Copyright (c) 2009 Peter Holik
> + *
> + * This file is part of Libav.
> + *
> + * Libav is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * Libav is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with Libav; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +/**
> + * @file
> + * PNG parser
> + */
> +
> +#include "libavutil/intreadwrite.h"
> +#include "libavutil/common.h"
> +
> +#include "parser.h"
> +
> +#define PNG_SIGNATURE UINT64_C(0x89504e470d0a1a0a)
> +#define MNG_SIGNATURE UINT64_C(0x8a4d4e470d0a1a0a)

This needs stdint.h I think.

Also a bump+Changelog entry is in order.

Otherwise should be fine if Костя thinks it's ok.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to