summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-04-16 22:15:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-04-24 17:05:02 +0200
commit18a567c369d74af5ef651b07c4c5615f5598616b (patch)
treed6e807ea5e265eca1f1fb66ec0e9d51fcb04a13d /libavformat/mov.c
parented188f6dcdf0935c939ed813cf8745d50742014b (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 <sandersd@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 247a65ed11..d0347b2970 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7872,6 +7872,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);
@@ -7883,6 +7884,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
av_assert0(next == (int)next);
time_sample = next;
}
+ }
return sample;
}