diff --git a/libavformat/mov.c b/libavformat/mov.c index 83a48335ac..a6732ad3e0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -9574,6 +9574,9 @@ static int mov_read_header(AVFormatContext *s) st->codecpar->width = item->width; st->codecpar->height = item->height; + if (sc->sample_count != 1 || sc->chunk_count != 1) + return AVERROR_INVALIDDATA; + sc->sample_sizes[0] = item->extent_length; sc->chunk_offsets[0] = item->extent_offset + offset;