[FFmpeg-devel] [PATCH v3 2/2] libavformat/oggparseopus: Clear existing stream metadata before parsing potentially new one. Fixes: #10363
toots at rastageeks.org
toots at rastageeks.org
Mon May 15 00:37:43 EEST 2023
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