[FFmpeg-cvslog] avformat/mov: Only fail for STCO/STSC contradictions if both exist

Michael Niedermayer git at videolan.org
Sat Jun 16 01:31:19 EEST 2018


ffmpeg | branch: release/4.0 | Michael Niedermayer <michael at niedermayer.cc> | Tue May 15 17:07:00 2018 +0200| [c97f9ed53f41b2305fcdea42027979285078b9d4] | committer: Michael Niedermayer

avformat/mov: Only fail for STCO/STSC contradictions if both exist

Fixes regression with playback of GF9720Repeal20the20Eighth20with20Helen20Linehan.m4a
See: crbug 822666

Found-by: "Mattias Wadman <mattias.wadman at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 2c2d689c56646cce64d02a3b75f61c12c5589260)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1340bf3913..0667ba3ded 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4144,7 +4144,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                st->index);
         return 0;
     }
-    if (sc->stsc_count && sc->stsc_data[ sc->stsc_count - 1 ].first > sc->chunk_count) {
+    if (sc->chunk_count && sc->stsc_count && sc->stsc_data[ sc->stsc_count - 1 ].first > sc->chunk_count) {
         av_log(c->fc, AV_LOG_ERROR, "stream %d, contradictionary STSC and STCO\n",
                st->index);
         return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list