summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-09-16 15:20:21 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-16 15:22:54 +0200
commit161495a3d026a73bc802c66a94e867ef457320d4 (patch)
treeeff6759d25720162f4318cdbdf4c41400c3fd95f /libavcodec/pngdec.c
parentc79f07cc0c0b15252f13f56d61cf29c0081445b3 (diff)
avcodec/lscr: stop returning error if size of packet is 2 bytes
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 2 insertions, 0 deletions
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);