[FFmpeg-cvslog] lavf/mov: Do not fail hard for truncated stsz atoms.

Carl Eugen Hoyos git at videolan.org
Tue Jun 19 23:49:34 EEST 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sat Jun 16 14:22:52 2018 +0200| [a9901840079b156c88c6d9ad4a61bc6e7e9c6235] | committer: Carl Eugen Hoyos

lavf/mov: Do not fail hard for truncated stsz atoms.

Fixes ticket #6433.

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

 libavformat/mov.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0acf981aef..1011763641 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);



More information about the ffmpeg-cvslog mailing list