aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-04-01 23:54:53 -0300
committerJames Almer <jamrial@gmail.com>2024-04-02 00:16:31 -0300
commit5a06d3810e41134ee9c2941cc0b371da62b539db (patch)
tree33d0568040692417444bfe875e04c750fb799d61
parent3d12ba77d9a4660b2e71889d1c2f99e8f3ade98b (diff)
downloadffmpeg-5a06d3810e41134ee9c2941cc0b371da62b539db.tar.gz
avformat/mov: don't read key_size bytes twice in the keys atom
We only support mdta as type, yet we were not skipping other types, but rather reading key_size worth of bytes twice per entry. Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/mov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3273e2e89b..a935ef7326 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5049,6 +5049,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
key_size -= 8;
if (type != MKTAG('m','d','t','a')) {
avio_skip(pb, key_size);
+ continue;
}
c->meta_keys[i] = av_mallocz(key_size + 1);
if (!c->meta_keys[i])