diff options
author | Michael Niedermayer <[email protected]> | 2019-04-16 22:15:14 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2019-11-14 23:30:37 +0100 |
commit | 26d7824352f0baada703024b4920166004b451af (patch) | |
tree | 96876e202a07f80be4ec3f01b4365bd596034168 | |
parent | 59ac4182583e4791a7f98b79099916fd96beedfd (diff) |
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 <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 18a567c369d74af5ef651b07c4c5615f5598616b)
Signed-off-by: Michael Niedermayer <[email protected]>
-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 51118ba07d..e72a9f6cbe 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6781,6 +6781,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); @@ -6792,6 +6793,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, av_assert0(next == (int)next); time_sample = next; } + } return sample; } |