This is not allowed per the spec.

Signed-off-by: Vignesh Venkatasubramanian <[email protected]>
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 294c864fbd..a8f57f9281 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4892,6 +4892,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) {
-- 
2.42.0.582.g8ccd20d70d-goog

_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to