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

Vittorio Giovara vittorio.giovara at gmail.com
Wed Oct 4 04:33:24 EEST 2023


On Tue, Oct 3, 2023 at 7:05 PM Vignesh Venkatasubramanian via ffmpeg-devel <
ffmpeg-devel at ffmpeg.org> wrote:

> This is not allowed per the spec.
>
> Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
> ---
>  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) {
> --
>

lgtm
-- 
Vittorio


More information about the ffmpeg-devel mailing list