1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mov: Allow empty stts atom.

Fixes regressions caused by 30c3d976
This commit is contained in:
Alex Converse 2011-12-02 17:00:11 -08:00
parent def5dc1260
commit 6d23d19729

View File

@ -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));