[FFmpeg-cvslog] mov: Allow empty stts atom.
Alex Converse
git at videolan.org
Tue Dec 6 01:53:36 CET 2011
ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Fri Dec 2 17:00:11 2011 -0800| [6d23d19729b2108459d6182b1a0afd0283aea1c6] | committer: Alex Converse
mov: Allow empty stts atom.
Fixes regressions caused by 30c3d976
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d23d19729b2108459d6182b1a0afd0283aea1c6
---
libavformat/mov.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9f45441..e2bb4d6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1500,7 +1500,9 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_dlog(c->fc, "track[%i].stts.entries = %i\n",
c->fc->nb_streams-1, entries);
- if (!entries || entries >= UINT_MAX / sizeof(*sc->stts_data))
+ if (!entries)
+ return 0;
+ if (entries >= UINT_MAX / sizeof(*sc->stts_data))
return AVERROR(EINVAL);
sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data));
More information about the ffmpeg-cvslog
mailing list