summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2018-05-15 17:07:00 +0200
committerMichael Niedermayer <[email protected]>2018-06-18 01:16:04 +0200
commit3712d4da1e2cc6683579cc2e4fde449cd5b0cf67 (patch)
tree11fe1d3dc73598862d20d874aeba2ef2a13b18bf
parent22b3e924dfd6de52310bbb578d1462eb7ce4166a (diff)
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 2c2d689c56646cce64d02a3b75f61c12c5589260) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f14fd14c7d..5ebca26ae5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3815,7 +3815,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;