[FFmpeg-devel] [PATCH v1] avcodec/pngenc: fix the warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const uint8_t *
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Sep 11 23:53:23 EEST 2019
Am Di., 10. Sept. 2019 um 16:19 Uhr 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/pngenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
> index d4d8dc8..e78a829 100644
> --- a/libavcodec/pngenc.c
> +++ b/libavcodec/pngenc.c
> @@ -274,7 +274,7 @@ static int png_write_row(AVCodecContext *avctx, const uint8_t *data, int size)
> int ret;
>
> s->zstream.avail_in = size;
> - s->zstream.next_in = data;
> + s->zstream.next_in = (uint8_t*)data;
Same comment:
I am not convinced that this is a good change as FFmpeg requests const
next_in from libz via a compile option but in any case, the commit
message should contain the actual, complete warning.
Carl Eugen
More information about the ffmpeg-devel
mailing list