diff mbox series

[FFmpeg-devel] avformat/oggparsevorbis: Don't append to title metadata

Message ID cUsnF-DIJibh_yY-bi5TglwHGyRbjmu27ZYGQjx9HWFq2J2xVPojH0IcKdAGqiDX014auB4vvhlQXWLjALeRmOuC01GYjXvIfNnvtrqfW_A=@protonmail.com
State New
Headers show
Series [FFmpeg-devel] avformat/oggparsevorbis: Don't append to title metadata | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zsolt Vadász Jan. 4, 2023, 11:37 a.m. UTC
This patch fixes #9642.

Signed-off-by: Zsolt Vadasz <zsolt_vadasz@protonmail.com>
---
 libavformat/oggparsevorbis.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 061840c2ed..02be4e07b8 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -134,9 +134,13 @@  static int vorbis_parse_single_comment(AVFormatContext *as, AVDictionary **m,
         }
     } else if (!ogm_chapter(as, t, v)) {
         (*updates)++;
-        if (av_dict_get(*m, t, NULL, 0))
-            av_dict_set(m, t, ";", AV_DICT_APPEND);
-        av_dict_set(m, t, v, AV_DICT_APPEND);
+        if(!av_strncasecmp("title", t, strlen("title")))
+            av_dict_set(m, t, v, 0);
+        else {
+            if (av_dict_get(*m, t, NULL, 0))
+                av_dict_set(m, t, ";", AV_DICT_APPEND);
+            av_dict_set(m, t, v, AV_DICT_APPEND);
+        }
     }
 end:
     t[tl] = '=';