Commit 6d23d197 authored by Alex Converse's avatar Alex Converse

mov: Allow empty stts atom.

Fixes regressions caused by 30c3d976
parent def5dc12
...@@ -1500,7 +1500,9 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -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", av_dlog(c->fc, "track[%i].stts.entries = %i\n",
c->fc->nb_streams-1, entries); 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); return AVERROR(EINVAL);
sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data)); sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment