[FFmpeg-devel] [PATCH 04/11] avformat/apngdec: Return error when header incomplete

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Tue Dec 10 23:59:48 EET 2019


When an incomplete header is encountered, apng_read_header would under
certain circumstances only return the return value of the last
successfull call. So override this by returning AVERROR_EOF manually.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/apngdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 0f1d04a365..6c58fd9d04 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -240,6 +240,8 @@ static int apng_read_header(AVFormatContext *s)
         }
     }
 
+    return AVERROR_EOF;
+
 fail:
     return ret;
 }
-- 
2.20.1



More information about the ffmpeg-devel mailing list