Without this the mov demuxer can return a large number of empty packets. Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- libavformat/mov.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c index f6f07be..a6290d1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4260,6 +4260,11 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) sample->size = FFMIN(sample->size, (mov->next_root_atom - sample->pos)); } + if (!sample->size) { + av_log(s, AV_LOG_ERROR, "sample size is zero\n"); + return AVERROR_INVALIDDATA; + } + if (st->discard != AVDISCARD_ALL) { if (avio_seek(sc->pb, sample->pos, SEEK_SET) != sample->pos) { av_log(mov->fc, AV_LOG_ERROR, "stream %d, offset 0x%"PRIx64": partial file\n", -- 2.1.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel