1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
FFmpeg/tests/ref/fate/id3v2-priv-remux
Andreas Rheinhardt 8068f2fcf3 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>
2021-04-18 02:24:44 +02:00

19 lines
671 B
Plaintext

bb2816e3a05ce136e9ac14479c1ebe24 *tests/data/fate/id3v2-priv-remux.mp3
8542 tests/data/fate/id3v2-priv-remux.mp3
#tb 0: 1/14112000
#media_type 0: audio
#codec_id 0: mp3
#sample_rate 0: 48000
#channel_layout 0: 4
#channel_layout_name 0: mono
0, -155528, -155528, 338688, 192, 0x3774510e, S=1, 10, 0x00bc0013
0, 183160, 183160, 338688, 192, 0x856c5b02
0, 521848, 521848, 338688, 192, 0xb86e557f
0, 860536, 860536, 338688, 192, 0x3b6c5cb7
0, 1199224, 1199224, 338688, 192, 0xe1bc5c76
[FORMAT]
TAG:title=id3v2-test
TAG:id3v2_priv.testowner2=\x00\x01\x02
TAG:id3v2_priv.testowner=testdata
[/FORMAT]