diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-12-02 17:00:11 -0800 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-12-04 15:20:48 -0800 |
commit | 6d23d19729b2108459d6182b1a0afd0283aea1c6 (patch) | |
tree | 61ce966044e7a317e140fc688e9522c4d668b2d9 /libavformat/mov.c | |
parent | def5dc1260e99cf7f6e99747013307a152bed801 (diff) | |
download | ffmpeg-6d23d19729b2108459d6182b1a0afd0283aea1c6.tar.gz |
mov: Allow empty stts atom.
Fixes regressions caused by 30c3d976
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 9f45441a71..e2bb4d650d 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)); |