From 161495a3d026a73bc802c66a94e867ef457320d4 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 16 Sep 2020 15:20:21 +0200 Subject: [PATCH] avcodec/lscr: stop returning error if size of packet is 2 bytes --- libavcodec/pngdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 647e7f0a74..395b86bbe7 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1597,6 +1597,8 @@ static int decode_frame_lscr(AVCodecContext *avctx, if (avpkt->size < 2) return AVERROR_INVALIDDATA; + if (avpkt->size == 2) + return 0; bytestream2_init(gb, avpkt->data, avpkt->size);