[FFmpeg-cvslog] avformat/mov: Disallow more than one meta box for AVIF

Vignesh Venkatasubramanian via ffmpeg-devel git at videolan.org
Mon Oct 9 00:00:39 EEST 2023


ffmpeg | branch: master | Vignesh Venkatasubramanian via ffmpeg-devel <ffmpeg-devel at ffmpeg.org> | Tue Oct  3 16:04:19 2023 -0700| [9132a0fbe25d472952872c67abe818aec5d64e4a] | committer: Michael Niedermayer

avformat/mov: Disallow more than one meta box for AVIF

This is not allowed per the spec.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
Reviewed-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9132a0fbe25d472952872c67abe818aec5d64e4a
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 13ddedcac1..5cc8cd9eb9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4903,6 +4903,8 @@ static int avif_add_stream(MOVContext *c, int item_id)
 {
     MOVStreamContext *sc;
     AVStream *st;
+    if (c->fc->nb_streams)
+        return AVERROR_INVALIDDATA;
     int item_index = -1;
     for (int i = 0; i < c->avif_info_size; i++)
         if (c->avif_info[i].item_id == item_id) {



More information about the ffmpeg-cvslog mailing list