This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 0f2e6939560e0a2697dc71c56d83dab5a6a846a5
Author:     Romain Beauxis <[email protected]>
AuthorDate: Tue Dec 2 10:43:46 2025 -0600
Commit:     Romain Beauxis <[email protected]>
CommitDate: Thu May 7 09:46:53 2026 -0500

    tests/fate/id3v2.mak: add new tests for comm, lyrics, txx and wma
    comments.
    
    Signed-off-by: Romain Beauxis <[email protected]>
---
 tests/fate/id3v2.mak                         | 75 +++++++++++++++++++++++++++-
 tests/ref/fate/id3v2-comm                    |  4 ++
 tests/ref/fate/id3v2-comm-dashed-descriptor  |  2 +
 tests/ref/fate/id3v2-comm-descriptor         |  2 +
 tests/ref/fate/id3v2-comm-descriptor-no-lang |  2 +
 tests/ref/fate/id3v2-comm-invalid-lang       |  2 +
 tests/ref/fate/id3v2-comm-lang-as-descriptor |  2 +
 tests/ref/fate/id3v2-comm-long-descriptor    |  2 +
 tests/ref/fate/id3v2-comm-multi-invalid-lang |  2 +
 tests/ref/fate/id3v2-comm-raw-key            |  2 +
 tests/ref/fate/id3v2-comm-raw-key-suffix     |  2 +
 tests/ref/fate/id3v2-comm-sort               |  2 +
 tests/ref/fate/id3v2-lyrics                  |  4 ++
 tests/ref/fate/id3v2-txxx                    |  2 +
 tests/ref/fate/id3v2-wma-comm                | 24 +++++++++
 15 files changed, 127 insertions(+), 2 deletions(-)

diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak
index a3040e9759..9c621e5f9d 100644
--- a/tests/fate/id3v2.mak
+++ b/tests/fate/id3v2.mak
@@ -8,6 +8,20 @@ fate-id3v2-invalid-tags: CMP = null
 FATE_ID3V2_FFMPEG_FFPROBE-$(call REMUX, MP3) += fate-id3v2-priv-remux
 fate-id3v2-priv-remux: CMD = transcode mp3 
$(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 mp3 "-c copy" "-c copy -t 0.1" 
"-show_entries format_tags"
 
+ID3V2_TESTBIN = libavformat/tests/id3v2$(EXESUF)
+
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm
+fate-id3v2-comm: $(ID3V2_TESTBIN)
+fate-id3v2-comm: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner 
-loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -map_metadata -1 -c 
copy -fflags +bitexact -metadata comment=test -metadata comment-eng=test2 -f 
mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-lyrics
+fate-id3v2-lyrics: $(ID3V2_TESTBIN)
+fate-id3v2-lyrics: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner 
-loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -map_metadata -1 -c 
copy -fflags +bitexact -id3v2_version 3 -metadata lyrics=test -metadata 
lyrics-fra=test2 -f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-txxx
+fate-id3v2-txxx: $(ID3V2_TESTBIN)
+fate-id3v2-txxx: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner 
-loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -map_metadata -1 -c 
copy -fflags +bitexact -metadata foobar=baz -f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
 FATE_ID3V2_FFMPEG_FFPROBE-$(call REMUX, AIFF, WAV_DEMUXER) += 
fate-id3v2-chapters
 fate-id3v2-chapters: CMD = transcode wav $(TARGET_SAMPLES)/wav/200828-005.wav 
aiff "-c copy -metadata:c:0 description=foo -metadata:c:0 date=2021 -metadata:c 
copyright=none -metadata:c:1 genre=nonsense -write_id3v2 1" "-c copy -t 0.05" 
"-show_entries format_tags:chapters"
 
@@ -16,7 +30,64 @@ fate-id3v2-chapters: CMD = transcode wav 
$(TARGET_SAMPLES)/wav/200828-005.wav ai
 FATE_ID3V2_FFMPEG_FFPROBE-$(call REMUX, AIFF, WAV_DEMUXER FLAC_DEMUXER 
PCM_S16LE_DECODER MJPEG_DECODER ARESAMPLE_FILTER CHANNELMAP_FILTER 
PCM_S24BE_ENCODER) += fate-id3v2-utf16-bom
 fate-id3v2-utf16-bom: CMD = transcode wav 
$(TARGET_SAMPLES)/audio-reference/yo.raw-short.wav aiff "-map 0:a -map 1:v -af 
aresample,channelmap=channel_layout=hexagonal,aresample -c:a pcm_s24be -c:v 
copy -write_id3v2 1 -id3v2_version 3 -map_metadata:g:0 1:g -map_metadata:s:v 
1:g" "-c copy -t 0.05" "-show_entries 
stream=channel_layout:stream_tags:format_tags" "-i 
$(TARGET_SAMPLES)/cover_art/cover_art.flac"
 
+# Test legacy COMM descriptor behavior: non-empty descriptor becomes the key.
+# MusicMatch tools embed artist bio etc. this way.
+FATE_ID3V2_FFPROBE-$(CONFIG_ASF_DEMUXER) += fate-id3v2-wma-comm
+fate-id3v2-wma-comm: CMD = probetags 
$(TARGET_SAMPLES)/cover_art/wma_with_ID3_APIC_trimmed.wma
+
+
+# Round-trip: write COMM with descriptor, read back (legacy: descriptor as 
key).
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-descriptor
+fate-id3v2-comm-descriptor: $(ID3V2_TESTBIN)
+fate-id3v2-comm-descriptor: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata 
comment-MusicMatch_Bio-eng=test -f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+# Round-trip: COMM descriptor containing a dash is preserved.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-dashed-descriptor
+fate-id3v2-comm-dashed-descriptor: $(ID3V2_TESTBIN)
+fate-id3v2-comm-dashed-descriptor: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata comment-Foo-Bar-eng=test 
-f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+# Round-trip: COMM with descriptor and empty lang (trailing dash).
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-descriptor-no-lang
+fate-id3v2-comm-descriptor-no-lang: $(ID3V2_TESTBIN)
+fate-id3v2-comm-descriptor-no-lang: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata 
comment-MusicMatch_Bio-=test -f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+# Descriptor that looks like a lang code (eng) with empty lang: must round-trip
+# as comment-eng- (trailing dash), not comment-eng (which means lang-only).
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-lang-as-descriptor
+fate-id3v2-comm-lang-as-descriptor: $(ID3V2_TESTBIN)
+fate-id3v2-comm-lang-as-descriptor: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata comment-eng-=test -f mp3 
-y" "$(ID3V2_TESTBIN)" mp3
+
+# Raw 4CC key "COMM" (length 4): treated as bare COMM frame, no descriptor, no 
lang.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-raw-key
+fate-id3v2-comm-raw-key: $(ID3V2_TESTBIN)
+fate-id3v2-comm-raw-key: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner 
-loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -map_metadata -1 -c 
copy -fflags +bitexact -metadata COMM=test -f mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+# Raw 4CC key with suffix ("COMM-eng"): not an exact 4CC match, must pass 
through as TXXX.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-raw-key-suffix
+fate-id3v2-comm-raw-key-suffix: $(ID3V2_TESTBIN)
+fate-id3v2-comm-raw-key-suffix: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata COMM-eng=test -f mp3 -y" 
"$(ID3V2_TESTBIN)" mp3
+
+# comment-xyz: single 3-char suffix that is NOT a valid ISO 639-2 lang → 
descriptor only, no lang.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-invalid-lang
+fate-id3v2-comm-invalid-lang: $(ID3V2_TESTBIN)
+fate-id3v2-comm-invalid-lang: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata comment-xyz=test -f mp3 
-y" "$(ID3V2_TESTBIN)" mp3
+
+# comment-foobar: single suffix longer than 3 chars → descriptor only, no lang.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-long-descriptor
+fate-id3v2-comm-long-descriptor: $(ID3V2_TESTBIN)
+fate-id3v2-comm-long-descriptor: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata comment-foobar=test -f mp3 
-y" "$(ID3V2_TESTBIN)" mp3
+
+# comment-desc-xyz: multi-dash, last component "xyz" not a valid ISO 639-2 
lang → full "desc-xyz" as descriptor.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-multi-invalid-lang
+fate-id3v2-comm-multi-invalid-lang: $(ID3V2_TESTBIN)
+fate-id3v2-comm-multi-invalid-lang: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 
-map_metadata -1 -c copy -fflags +bitexact -metadata comment-desc-xyz=test -f 
mp3 -y" "$(ID3V2_TESTBIN)" mp3
+
+# comment-sort must not be treated as COMM (lang "sor"): it must pass through 
as TXXX.
+FATE_ID3V2_RAW-$(call REMUX, MP3) += fate-id3v2-comm-sort
+fate-id3v2-comm-sort: $(ID3V2_TESTBIN)
+fate-id3v2-comm-sort: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner 
-loglevel error -i $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -map_metadata -1 -c 
copy -fflags +bitexact -metadata comment-sort=test -f mp3 -y" 
"$(ID3V2_TESTBIN)" mp3
+
 FATE_SAMPLES_FFPROBE        += $(FATE_ID3V2_FFPROBE-yes)
-FATE_SAMPLES_FFMPEG         += $(FATE_ID3V2_FFMPEG-yes)
+FATE_SAMPLES_FFMPEG         += $(FATE_ID3V2_FFMPEG-yes) $(FATE_ID3V2_RAW-yes)
 FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_ID3V2_FFMPEG_FFPROBE-yes)
-fate-id3v2: $(FATE_ID3V2_FFPROBE-yes) $(FATE_ID3V2_FFMPEG_FFPROBE-yes) 
$(FATE_ID3V2_FFMPEG-yes)
+fate-id3v2: $(FATE_ID3V2_FFPROBE-yes) $(FATE_ID3V2_FFMPEG_FFPROBE-yes) 
$(FATE_ID3V2_FFMPEG-yes) $(FATE_ID3V2_RAW-yes)
diff --git a/tests/ref/fate/id3v2-comm b/tests/ref/fate/id3v2-comm
new file mode 100644
index 0000000000..bdd34cdd91
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm
@@ -0,0 +1,4 @@
+ID3v2 frame TXXX (14 bytes):|.comment.test.|
+ID3v2 frame TXXX (19 bytes):|.comment-eng.test2.|
+comment=test
+comment-eng=test2
diff --git a/tests/ref/fate/id3v2-comm-dashed-descriptor 
b/tests/ref/fate/id3v2-comm-dashed-descriptor
new file mode 100644
index 0000000000..ca01cf6eb7
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-dashed-descriptor
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (26 bytes):|.comment-Foo-Bar-eng.test.|
+comment-Foo-Bar-eng=test
diff --git a/tests/ref/fate/id3v2-comm-descriptor 
b/tests/ref/fate/id3v2-comm-descriptor
new file mode 100644
index 0000000000..903d52c9e3
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-descriptor
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (33 bytes):|.comment-MusicMatch_Bio-eng.test.|
+comment-MusicMatch_Bio-eng=test
diff --git a/tests/ref/fate/id3v2-comm-descriptor-no-lang 
b/tests/ref/fate/id3v2-comm-descriptor-no-lang
new file mode 100644
index 0000000000..0441abfb5d
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-descriptor-no-lang
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (30 bytes):|.comment-MusicMatch_Bio-.test.|
+comment-MusicMatch_Bio-=test
diff --git a/tests/ref/fate/id3v2-comm-invalid-lang 
b/tests/ref/fate/id3v2-comm-invalid-lang
new file mode 100644
index 0000000000..46c97679d0
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-invalid-lang
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (18 bytes):|.comment-xyz.test.|
+comment-xyz=test
diff --git a/tests/ref/fate/id3v2-comm-lang-as-descriptor 
b/tests/ref/fate/id3v2-comm-lang-as-descriptor
new file mode 100644
index 0000000000..66a57d2988
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-lang-as-descriptor
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (19 bytes):|.comment-eng-.test.|
+comment-eng-=test
diff --git a/tests/ref/fate/id3v2-comm-long-descriptor 
b/tests/ref/fate/id3v2-comm-long-descriptor
new file mode 100644
index 0000000000..b199919b5a
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-long-descriptor
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (21 bytes):|.comment-foobar.test.|
+comment-foobar=test
diff --git a/tests/ref/fate/id3v2-comm-multi-invalid-lang 
b/tests/ref/fate/id3v2-comm-multi-invalid-lang
new file mode 100644
index 0000000000..d3349a0b21
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-multi-invalid-lang
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (23 bytes):|.comment-desc-xyz.test.|
+comment-desc-xyz=test
diff --git a/tests/ref/fate/id3v2-comm-raw-key 
b/tests/ref/fate/id3v2-comm-raw-key
new file mode 100644
index 0000000000..911b725915
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-raw-key
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (11 bytes):|.COMM.test.|
+COMM=test
diff --git a/tests/ref/fate/id3v2-comm-raw-key-suffix 
b/tests/ref/fate/id3v2-comm-raw-key-suffix
new file mode 100644
index 0000000000..bec708fddf
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-raw-key-suffix
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (15 bytes):|.COMM-eng.test.|
+COMM-eng=test
diff --git a/tests/ref/fate/id3v2-comm-sort b/tests/ref/fate/id3v2-comm-sort
new file mode 100644
index 0000000000..8b3fe87250
--- /dev/null
+++ b/tests/ref/fate/id3v2-comm-sort
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (19 bytes):|.comment-sort.test.|
+comment-sort=test
diff --git a/tests/ref/fate/id3v2-lyrics b/tests/ref/fate/id3v2-lyrics
new file mode 100644
index 0000000000..02e7ca2cc6
--- /dev/null
+++ b/tests/ref/fate/id3v2-lyrics
@@ -0,0 +1,4 @@
+ID3v2 frame TXXX (11 bytes):|.USLT.test.|
+ID3v2 frame TXXX (18 bytes):|.lyrics-fra.test2.|
+lyrics=test
+lyrics-fra=test2
diff --git a/tests/ref/fate/id3v2-txxx b/tests/ref/fate/id3v2-txxx
new file mode 100644
index 0000000000..3943693d95
--- /dev/null
+++ b/tests/ref/fate/id3v2-txxx
@@ -0,0 +1,2 @@
+ID3v2 frame TXXX (12 bytes):|.foobar.baz.|
+foobar=baz
diff --git a/tests/ref/fate/id3v2-wma-comm b/tests/ref/fate/id3v2-wma-comm
new file mode 100644
index 0000000000..5a615d6d93
--- /dev/null
+++ b/tests/ref/fate/id3v2-wma-comm
@@ -0,0 +1,24 @@
+[FORMAT]
+TAG:title=Piste 5
+TAG:artist=Higelin
+TAG:WM/Track=4
+TAG:WMFSDKVersion=8.00.00.4477
+TAG:WMFSDKNeeded=0.0.0.0000
+TAG:WM/GenreID=Inconnu
+TAG:track=00
+TAG:album=Tombé du Ciel
+TAG:genre=Inconnu
+TAG:comment=
+TAG:lyrics-eng=
+TAG:MusicMatch_Bio=
+TAG:TLEN=286000
+TAG:MusicMatch_Tempo=
+TAG:MusicMatch_Mood=
+TAG:MusicMatch_Preference=
+TAG:MusicMatch_Situation=
+TAG:track=5
+TAG:composer=Jacques Higelin
+TAG:WM/EncodingTime=1120324736
+TAG:album_artist=Jacques Higelin
+TAG:WM/Provider=User Feedback
+[/FORMAT]

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to