diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2017-02-11 21:44:08 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-02-15 00:40:00 +0100 |
commit | b446f0e98f85e2e931b476e52b319f1c49244660 (patch) | |
tree | a0ec61fdab5677b870e5e30330a4bd35a1c394ae /libavformat | |
parent | e791b915c774408fbc0ec9e7270b021899e08ccc (diff) | |
download | ffmpeg-b446f0e98f85e2e931b476e52b319f1c49244660.tar.gz |
mov: Do not try to parse multiple stsd for the same track
Bug-Id: 1017
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 11bcff035c..5c9f85c738 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1911,6 +1911,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb24(pb); /* flags */ entries = avio_rb32(pb); + if (sc->extradata) { + av_log(c->fc, AV_LOG_ERROR, + "Duplicate stsd found in this track.\n"); + return AVERROR_INVALIDDATA; + } + /* Prepare space for hosting multiple extradata. */ sc->extradata = av_mallocz_array(entries, sizeof(*sc->extradata)); if (!sc->extradata) |