[FFmpeg-cvslog] avcodec/lscr: stop returning error if size of packet is 2 bytes

Paul B Mahol git at videolan.org
Wed Sep 16 16:23:59 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Sep 16 15:20:21 2020 +0200| [161495a3d026a73bc802c66a94e867ef457320d4] | committer: Paul B Mahol

avcodec/lscr: stop returning error if size of packet is 2 bytes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=161495a3d026a73bc802c66a94e867ef457320d4
---

 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);
 



More information about the ffmpeg-cvslog mailing list