[FFmpeg-cvslog] r19040 - trunk/libavcodec/lcldec.c

Ivan Kalvachev ikalvachev
Sun May 31 21:21:39 CEST 2009


On 5/31/09, reimar <subversion at mplayerhq.hu> wrote:
> Author: reimar
> Date: Sun May 31 11:51:46 2009
> New Revision: 19040
>
> Log:
> Factor out zlib decompression code to avoid massive code duplication,
> particularly due to error checks.
>
> Modified:
>    trunk/libavcodec/lcldec.c
>
> Modified: trunk/libavcodec/lcldec.c
> ==============================================================================
> --- trunk/libavcodec/lcldec.c	Sun May 31 11:28:29 2009	(r19039)
> +++ trunk/libavcodec/lcldec.c	Sun May 31 11:51:46 2009	(r19040)
> @@ -115,6 +115,38 @@ static unsigned int mszh_decomp(unsigned
>  }
>
>

> +/**
> + * \brief decompress a zlib-compressed data block into decomp_buf
> + * \param src compressed input buffer
> + * \param src_len data length in input buffer
> + * \param offset offset in decomp_buf
> + * \param expected expected decompressed length
> + */
> +static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int

That function is missing the zlib safeguard.
 +#if CONFIG_ZLIB_DECODER



More information about the ffmpeg-cvslog mailing list