[FFmpeg-devel] [PATCH 2/3] lavf/metadata: support duplicate keys in ff_metadata_conv

rcombs rcombs at rcombs.me
Thu Aug 25 02:51:59 EEST 2022


---
 libavformat/metadata.c                    | 2 +-
 tests/ref/fate/cover-art-aiff-id3v2-remux | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/metadata.c b/libavformat/metadata.c
index b9b6de7972..2a1ffc69e7 100644
--- a/libavformat/metadata.c
+++ b/libavformat/metadata.c
@@ -50,7 +50,7 @@ void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv,
                     key = dc->native;
                     break;
                 }
-        av_dict_set(&dst, key, mtag->value, 0);
+        av_dict_set(&dst, key, mtag->value, AV_DICT_MULTIKEY | AV_DICT_DEDUP);
     }
     av_dict_free(pm);
     *pm = dst;
diff --git a/tests/ref/fate/cover-art-aiff-id3v2-remux b/tests/ref/fate/cover-art-aiff-id3v2-remux
index 3ca2855eb8..2eac5f8d9c 100644
--- a/tests/ref/fate/cover-art-aiff-id3v2-remux
+++ b/tests/ref/fate/cover-art-aiff-id3v2-remux
@@ -67,10 +67,10 @@ TAG:title=third
 TAG:comment=Conductor
 [/STREAM]
 [FORMAT]
-TAG:artist=Мельница
+TAG:title=Дороги
 TAG:RATING=0
 TAG:album=Ангелофрения
-TAG:title=Дороги
+TAG:artist=Мельница
 TAG:tracktotal=11
 TAG:totaltracks=11
 TAG:genre=Folk
-- 
2.37.1



More information about the ffmpeg-devel mailing list