On Thu, Apr 9, 2015 at 5:11 PM, Vittorio Giovara <[email protected]> wrote: > Add some bound checking to CLLC; reduce HQX variable scoping and add > an error message. > --- > libavcodec/Makefile | 4 ++-- > libavcodec/canopus.c | 62 > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > libavcodec/canopus.h | 31 ++++++++++++++++++++++++++ > libavcodec/cllc.c | 10 ++++++--- > libavcodec/hqx.c | 14 ++++++------ > 5 files changed, 109 insertions(+), 12 deletions(-) > create mode 100644 libavcodec/canopus.c > create mode 100644 libavcodec/canopus.h > > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index f7ab705..180c390 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -156,7 +156,7 @@ OBJS-$(CONFIG_CDXL_DECODER) += cdxl.o > OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o > OBJS-$(CONFIG_CLJR_DECODER) += cljrdec.o > OBJS-$(CONFIG_CLJR_ENCODER) += cljrenc.o > -OBJS-$(CONFIG_CLLC_DECODER) += cllc.o > +OBJS-$(CONFIG_CLLC_DECODER) += cllc.o canopus.o > OBJS-$(CONFIG_COOK_DECODER) += cook.o > OBJS-$(CONFIG_COMFORTNOISE_DECODER) += cngdec.o celp_filters.o > OBJS-$(CONFIG_COMFORTNOISE_ENCODER) += cngenc.o > @@ -232,7 +232,7 @@ OBJS-$(CONFIG_HEVC_DECODER) += hevc.o > hevc_mvs.o hevc_ps.o hevc_sei.o > hevc_cabac.o hevc_refs.o > hevcpred.o \ > hevcdsp.o hevc_filter.o > OBJS-$(CONFIG_HNM4_VIDEO_DECODER) += hnm4video.o > -OBJS-$(CONFIG_HQX_DECODER) += hqx.o hqxvlc.o hqxdsp.o > +OBJS-$(CONFIG_HQX_DECODER) += hqx.o hqxvlc.o hqxdsp.o canopus.o > OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o huffyuvdec.o > OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o huffyuvenc.o > OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o > diff --git a/libavcodec/canopus.c b/libavcodec/canopus.c > new file mode 100644 > index 0000000..1b229b4 > --- /dev/null > +++ b/libavcodec/canopus.c > @@ -0,0 +1,62 @@ > +/* > + * Canopus common routines > + * Copyright (c) 2015 Vittorio Giovara <[email protected]> > + * > + * 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 > + */ > + > +#include <stdint.h> > + > +#include "libavutil/rational.h" > + > +#include "avcodec.h" > +#include "bytestream.h" > +#include "canopus.h" > + > +int ff_canopus_parse_info_tag(AVCodecContext *avctx, uint8_t *src, size_t > size)
This needs to be const uint8_t *src, I edited it locally. Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
