avcodec/pngenc: Don't use deflateInit2() with default parameters

Use deflateInit() instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/5.1
Andreas Rheinhardt 3 years ago
parent 74c930e1b8
commit e9d12766b2
  1. 2
      libavcodec/pngenc.c

@ -1071,7 +1071,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx)
compression_level = avctx->compression_level == FF_COMPRESSION_DEFAULT
? Z_DEFAULT_COMPRESSION
: av_clip(avctx->compression_level, 0, 9);
if (deflateInit2(&s->zstream, compression_level, Z_DEFLATED, 15, 8, Z_DEFAULT_STRATEGY) != Z_OK)
if (deflateInit(&s->zstream, compression_level) != Z_OK)
return -1;
return 0;

Loading…
Cancel
Save