]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/lscr: stop returning error if size of packet is 2 bytes
authorPaul B Mahol <onemda@gmail.com>
Wed, 16 Sep 2020 13:20:21 +0000 (15:20 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 16 Sep 2020 13:22:54 +0000 (15:22 +0200)
libavcodec/pngdec.c

index 647e7f0a74c34aa60c9167c6559e8e1d67e72042..395b86bbe7b6ddbb91ae248528ec9d3bdafa7af9 100644 (file)
@@ -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);