aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-13 01:24:03 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-18 02:24:44 +0200
commit8068f2fcf33722875907e2fe25e81e1f05b1a476 (patch)
treef749d852ceaba88e7ea4e9ccbdef086d6539b38a /tests/ref
parent9f834a1ac1dfb8e61b1edbaa57c880518abb0f17 (diff)
downloadffmpeg-8068f2fcf33722875907e2fe25e81e1f05b1a476.tar.gz
avformat/id3v2: Don't reverse the order of id3v2 APICs
When parsing ID3v2 tags, special (non-text) metadata is not applied directly and unconditionally; instead it is stored in a linked list in which elements are prepended. When traversing the list to add APICs (or private tags) at the end, the order is reversed. The same also happens for chapters and therefore the chapter parsing code already reverses the chapters. This commit changes this: By keeping pointers to both head and tail of the linked list one can preserve the order of the entries and remove the reordering code for chapters. Only the pointer to head will be exported: No current caller uses a nonempty list, so exporting both head and tail is unnecessary. This removes the functionality to combine the lists of special metadata read from different ID3v2 tags, but that doesn't make really much sense anyway (and would be trivial to implement if desired) and allows to remove the now unnecessary initializations performed by the callers. The FATE-reference for the id3v2-priv test had to be updated because the order of the tags read into the dict is reversed; for id3v2-priv-remux only the md5 and not the ffprobe output of the remuxed file changes because the order of the private tags has up until now been reversed twice. The references for the aiff/mp3 cover-art tests needed to be updated, because the order of the attached pics is reversed upon reading. It is still not correct, because the muxers write the pics in the order in which they arrive at the muxer instead of the order given by pkt->stream_index. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests/ref')
-rw-r--r--tests/ref/fate/cover-art-aiff-id3v2-remux44
-rw-r--r--tests/ref/fate/cover-art-mp3-id3v2-remux16
-rw-r--r--tests/ref/fate/id3v2-priv2
-rw-r--r--tests/ref/fate/id3v2-priv-remux2
4 files changed, 32 insertions, 32 deletions
diff --git a/tests/ref/fate/cover-art-aiff-id3v2-remux b/tests/ref/fate/cover-art-aiff-id3v2-remux
index 207721fc71..c294c5013e 100644
--- a/tests/ref/fate/cover-art-aiff-id3v2-remux
+++ b/tests/ref/fate/cover-art-aiff-id3v2-remux
@@ -8,29 +8,29 @@ d4a9481090a8bab1a3f072a8108a1d6a *tests/data/fate/cover-art-aiff-id3v2-remux.aif
#channel_layout_name 0: stereo
#tb 1: 1/90000
#media_type 1: video
-#codec_id 1: bmp
+#codec_id 1: mjpeg
#dimensions 1: 350x350
-#sar 1: 0/1
+#sar 1: 1/1
#tb 2: 1/90000
#media_type 2: video
-#codec_id 2: png
+#codec_id 2: mjpeg
#dimensions 2: 350x350
#sar 2: 1/1
#tb 3: 1/90000
#media_type 3: video
-#codec_id 3: mjpeg
+#codec_id 3: png
#dimensions 3: 350x350
#sar 3: 1/1
#tb 4: 1/90000
#media_type 4: video
-#codec_id 4: mjpeg
+#codec_id 4: bmp
#dimensions 4: 350x350
-#sar 4: 1/1
+#sar 4: 0/1
0, 0, 0, 1024, 4096, 0xdac4695d
-1, 0, 0, 0, 368254, 0xfa7f4bd8
-2, 0, 0, 0, 184497, 0xc33f8d44
-3, 0, 0, 0, 19650, 0xd5662610
-4, 0, 0, 0, 19650, 0xd5662610
+1, 0, 0, 0, 19650, 0xd5662610
+2, 0, 0, 0, 19650, 0xd5662610
+3, 0, 0, 0, 184497, 0xc33f8d44
+4, 0, 0, 0, 368254, 0xfa7f4bd8
0, 1024, 1024, 1024, 4096, 0xad05c909
0, 2048, 2048, 1024, 4096, 0x97e3b8f8
0, 3072, 3072, 1024, 4096, 0xb08180fa
@@ -41,31 +41,31 @@ DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=1
-codec_name=bmp
+codec_name=mjpeg
DISPOSITION:attached_pic=1
-TAG:title=third
-TAG:comment=Conductor
+TAG:title=first
+TAG:comment=Other
[/STREAM]
[STREAM]
index=2
-codec_name=png
+codec_name=mjpeg
DISPOSITION:attached_pic=1
-TAG:title=second
-TAG:comment=Illustration
+TAG:title=fourth
+TAG:comment=Composer
[/STREAM]
[STREAM]
index=3
-codec_name=mjpeg
+codec_name=png
DISPOSITION:attached_pic=1
-TAG:title=fourth
-TAG:comment=Composer
+TAG:title=second
+TAG:comment=Illustration
[/STREAM]
[STREAM]
index=4
-codec_name=mjpeg
+codec_name=bmp
DISPOSITION:attached_pic=1
-TAG:title=first
-TAG:comment=Other
+TAG:title=third
+TAG:comment=Conductor
[/STREAM]
[FORMAT]
TAG:artist=Мельница
diff --git a/tests/ref/fate/cover-art-mp3-id3v2-remux b/tests/ref/fate/cover-art-mp3-id3v2-remux
index a3bc8c7891..713ca9e951 100644
--- a/tests/ref/fate/cover-art-mp3-id3v2-remux
+++ b/tests/ref/fate/cover-art-mp3-id3v2-remux
@@ -8,9 +8,9 @@ c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
#channel_layout_name 0: stereo
#tb 1: 1/90000
#media_type 1: video
-#codec_id 1: png
+#codec_id 1: mjpeg
#dimensions 1: 263x263
-#sar 1: 1/1
+#sar 1: 96/96
#tb 2: 1/90000
#media_type 2: video
#codec_id 2: bmp
@@ -18,13 +18,13 @@ c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
#sar 2: 0/1
#tb 3: 1/90000
#media_type 3: video
-#codec_id 3: mjpeg
+#codec_id 3: png
#dimensions 3: 263x263
-#sar 3: 96/96
+#sar 3: 1/1
0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10, 0x034e0055
-1, 0, 0, 0, 165671, 0x7c1c8070
+1, 0, 0, 0, 15760, 0x71d5c418
2, 0, 0, 0, 208350, 0x291b44d1
-3, 0, 0, 0, 15760, 0x71d5c418
+3, 0, 0, 0, 165671, 0x7c1c8070
0, 15050, 15050, 368640, 418, 0x46f684a4
0, 383690, 383690, 368640, 418, 0x46f684a4
0, 752330, 752330, 368640, 418, 0x46f684a4
@@ -37,7 +37,7 @@ TAG:encoder=Lavf
[/STREAM]
[STREAM]
index=1
-codec_name=png
+codec_name=mjpeg
DISPOSITION:attached_pic=1
TAG:comment=Other
[/STREAM]
@@ -49,7 +49,7 @@ TAG:comment=Band/Orchestra
[/STREAM]
[STREAM]
index=3
-codec_name=mjpeg
+codec_name=png
DISPOSITION:attached_pic=1
TAG:comment=Other
[/STREAM]
diff --git a/tests/ref/fate/id3v2-priv b/tests/ref/fate/id3v2-priv
index 965c8695e8..8448495325 100644
--- a/tests/ref/fate/id3v2-priv
+++ b/tests/ref/fate/id3v2-priv
@@ -1,5 +1,5 @@
[FORMAT]
TAG:title=id3v2-test
-TAG:id3v2_priv.testowner=testdata
TAG:id3v2_priv.testowner2=\x00\x01\x02
+TAG:id3v2_priv.testowner=testdata
[/FORMAT]
diff --git a/tests/ref/fate/id3v2-priv-remux b/tests/ref/fate/id3v2-priv-remux
index 0fdd5d9d0a..6a8b58f27e 100644
--- a/tests/ref/fate/id3v2-priv-remux
+++ b/tests/ref/fate/id3v2-priv-remux
@@ -1,4 +1,4 @@
-3e99254aa892a9578ce31da17b012a44 *tests/data/fate/id3v2-priv-remux.mp3
+bb2816e3a05ce136e9ac14479c1ebe24 *tests/data/fate/id3v2-priv-remux.mp3
8542 tests/data/fate/id3v2-priv-remux.mp3
#tb 0: 1/14112000
#media_type 0: audio