diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-05-15 17:07:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-16 19:06:27 +0200 |
commit | c48ac14c067d1b41650df785499c657361a0590b (patch) | |
tree | 992a204ce9521d21e9264dab66eccc6af54f0993 /libavformat | |
parent | 8283586dce95cf66de744b35d37e5ea4b8c12405 (diff) | |
download | ffmpeg-c48ac14c067d1b41650df785499c657361a0590b.tar.gz |
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@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2c2d689c56646cce64d02a3b75f61c12c5589260)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 921db588ef..11526346be 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3758,7 +3758,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; |