]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apngdec.c
avformat/utils: change assert to av_assert0()
[ffmpeg] / libavformat / apngdec.c
index 276d7659d88bb22b86389da4739ac63f611f31ec..d97b015a79fdbfb4be66832ce91d1391db146ccd 100644 (file)
  * @see http://www.w3.org/TR/PNG
  */
 
-#include "apng.h"
 #include "avformat.h"
 #include "avio_internal.h"
 #include "internal.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/opt.h"
+#include "libavcodec/apng.h"
 #include "libavcodec/png.h"
 #include "libavcodec/bytestream.h"
 
@@ -87,7 +87,7 @@ static int apng_probe(AVProbeData *p)
         /* we don't check IDAT size, as this is the last tag
          * we check, and it may be larger than the probe buffer */
         if (tag != MKTAG('I', 'D', 'A', 'T') &&
-            len > bytestream2_get_bytes_left(&gb))
+            len + 4 > bytestream2_get_bytes_left(&gb))
             return 0;
 
         switch (tag) {