diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index e6462967f6..eac4bd79fb 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -629,6 +629,8 @@ static av_cold int png_dec_init(AVCodecContext *avctx) { PNGDecContext *s = avctx->priv_data; + avctx->color_range = AVCOL_RANGE_JPEG; + s->prev = av_frame_alloc(); if (!s->prev) return AVERROR(ENOMEM);