diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-04-16 22:15:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-06-27 17:50:47 +0200 |
commit | 05a90821d05f88bd0a290878d1aa2c459aed67ac (patch) | |
tree | f0b386449034625ad315758b27cf02fe0619dbf3 | |
parent | 9b4004c054964a49c7ba44583f4cee22486dd8f2 (diff) | |
download | ffmpeg-05a90821d05f88bd0a290878d1aa2c459aed67ac.tar.gz |
avformat/mov: Skip stsd adjustment without chunks
Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272
Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 18a567c369d74af5ef651b07c4c5615f5598616b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index caba256161..9c5442988c 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7879,6 +7879,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, } /* adjust stsd index */ + if (sc->chunk_count) { time_sample = 0; for (i = 0; i < sc->stsc_count; i++) { int64_t next = time_sample + mov_get_stsc_samples(sc, i); @@ -7890,6 +7891,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, av_assert0(next == (int)next); time_sample = next; } + } return sample; } |