lavf/mov: Do not fail hard for truncated stsz atoms.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 16 Jun 2018 12:22:52 +0000 (14:22 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Tue, 19 Jun 2018 20:48:04 +0000 (22:48 +0200)
Fixes ticket #6433.

libavformat/mov.c

index 0acf981..1011763 100644 (file)
@@ -2841,7 +2841,8 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (ret < 0) {
         av_freep(&sc->sample_sizes);
         av_free(buf);
-        return ret;
+        av_log(c->fc, AV_LOG_WARNING, "STSZ atom truncated\n");
+        return 0;
     }
 
     init_get_bits(&gb, buf, 8*num_bytes);