Re: [libav-devel] [PATCH] mov: Do not try to parse multiple stsd boxes for the same track
On Sat, Feb 11, 2017 at 4:44 PM, Luca Barbatowrote: > Bug-Id: 1017 > CC: libav-sta...@libav.org > --- > > libavformat/mov.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 2810960..001abcc 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, > + "A stsd atom already found for the track.\n"); atom is the "mov" way of saying "box" and that might cause confusion, so I would rephrase the error message just "Duplicate stsd found in this track" Related, I'd drop "boxes" from the commit title as well. Otherwise OK. -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] mov: Do not try to parse multiple stsd boxes for the same track
Bug-Id: 1017 CC: libav-sta...@libav.org --- libavformat/mov.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 2810960..001abcc 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, + "A stsd atom already found for the track.\n"); +return AVERROR_INVALIDDATA; +} + /* Prepare space for hosting multiple extradata. */ sc->extradata = av_mallocz_array(entries, sizeof(*sc->extradata)); if (!sc->extradata) -- 2.10.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel