aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-04-16 22:15:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-05-09 11:21:25 +0200
commitd2035634943f82dfebccb52fe47692c1890c208e (patch)
tree00f91825a0c1cccb25ce5ab55c4b1d0a7caa5082
parentb5b12e2189b4ed6527b43a4924c67e3b847d2a51 (diff)
downloadffmpeg-d2035634943f82dfebccb52fe47692c1890c208e.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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f22a407f49..df9640fa6d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6002,6 +6002,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++) {
int next = time_sample + mov_get_stsc_samples(sc, i);
@@ -6012,6 +6013,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
}
time_sample = next;
}
+ }
ret = mov_seek_auxiliary_info(s, sc);
if (ret < 0) {