This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 8d3b044f84 avformat/mov: check for duplicate stsd before changing state
8d3b044f84 is described below
commit 8d3b044f848dcbf5eecccffdc023263258038867
Author: Michael Niedermayer <[email protected]>
AuthorDate: Mon Feb 9 03:07:21 2026 +0100
Commit: michaelni <[email protected]>
CommitDate: Wed Mar 4 10:17:35 2026 +0000
avformat/mov: check for duplicate stsd before changing state
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/mov.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 396a559fa4..64e943f73e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3209,6 +3209,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb,
MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams - 1];
sc = st->priv_data;
+ if (sc->extradata) {
+ av_log(c->fc, AV_LOG_ERROR,
+ "Duplicate stsd found in this track.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
sc->stsd_version = avio_r8(pb);
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
@@ -3219,12 +3225,6 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb,
MOVAtom atom)
return AVERROR_INVALIDDATA;
}
- 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_calloc(entries, sizeof(*sc->extradata));
if (!sc->extradata)
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]