[FFmpeg-devel] [PATCH v3 2/2] libavformat/oggparseopus: Clear existing stream metadata before parsing potentially new one. Fixes: #10363

Romain Beauxis toots at rastageeks.org
Fri May 19 03:50:21 EEST 2023


Hello again!

I wanted to see if there was any interest in this patch and the other one
adding metadata decoding for chained ogg bitstream. These two feel like
easy bugfixes and features to add to the next release.

Reproduction steps for this one are detailed here:
https://trac.ffmpeg.org/ticket/10363

-- Romain

Le dim. 14 mai 2023 à 16:42, <toots at rastageeks.org> a écrit :

> From: Romain Beauxis <toots at rastageeks.org>
>
> This is the third version of a series of patches improving metadata
> support in
> chained ogg streams.
>
> Previous versions of this patch were including changes that were later
> identified as issues from another encoded and fixed there. See:
> https://github.com/savonet/liquidsoap/pull/3062
>
> The remaining changes address a memory leak in chained ogg/opus stream
> metadata. Reproduction steps for the issue are detailed in:
> https://trac.ffmpeg.org/ticket/10363
>
> ---
>  libavformat/oggparseopus.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c
> index 54aa725be6..86977b41db 100644
> --- a/libavformat/oggparseopus.c
> +++ b/libavformat/oggparseopus.c
> @@ -80,6 +80,7 @@ static int opus_header(AVFormatContext *avf, int idx)
>      if (priv->need_comments) {
>          if (os->psize < 8 || memcmp(packet, "OpusTags", 8))
>              return AVERROR_INVALIDDATA;
> +        av_dict_free(&st->metadata);
>          ff_vorbis_stream_comment(avf, st, packet + 8, os->psize - 8);
>          priv->need_comments--;
>          return 1;
> --
> 2.37.1 (Apple Git-137.1)
>
>


More information about the ffmpeg-devel mailing list