Commit 73198aca authored by James Almer's avatar James Almer

Merge commit 'defe307f'

* commit 'defe307f':
  mov: move stsd finalization to an appropriate place
  mov: Do not set stsd_count if mov_read_stsd() fails
  mov: log and return early on non-positive stsd entry counts

See 8b43ee40
656feb64Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 27604549 defe307f
......@@ -2548,15 +2548,18 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
/* Prepare space for hosting multiple extradata. */
sc->extradata = av_mallocz_array(entries, sizeof(*sc->extradata));
if (!sc->extradata)
return AVERROR(ENOMEM);
sc->extradata_size = av_mallocz_array(entries, sizeof(*sc->extradata_size));
if (!sc->extradata_size || !sc->extradata) {
if (!sc->extradata_size) {
ret = AVERROR(ENOMEM);
goto fail;
}
ret = ff_mov_read_stsd_entries(c, pb, entries);
if (ret < 0)
return ret;
goto fail;
sc->stsd_count = entries;
......
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