[FFmpeg-devel] [PATCH v3] avcodec/tscc: fix for the backward compatibility to use const in the z_stream interface

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Sep 12 10:49:15 EEST 2019



> Am 12.09.2019 um 00:41 schrieb lance.lmwang at gmail.com:
> 
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavcodec/tscc.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
> index 6d03081..9eb17e3 100644
> --- a/libavcodec/tscc.c
> +++ b/libavcodec/tscc.c
> @@ -88,7 +88,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
>         av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
>         return AVERROR_UNKNOWN;
>     }
> -    c->zstream.next_in   = buf;
> +#if defined(z_const)
> +    c->zstream.next_in   = (z_const uint8_t*) buf;

This looks wrong.

> +#else
> +    c->zstream.next_in   = (uint8_t*) buf;
> +#endif

Since you have already shown that only a seven-year old version of zlib is necessary, I suggest to drop this patch.

Carl Eugen


More information about the ffmpeg-devel mailing list