mp3_afh: Detect both v1 and v2 tags.
authorAndre Noll <maan@systemlinux.org>
Fri, 27 Dec 2013 03:14:57 +0000 (03:14 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 18 Jan 2015 14:40:47 +0000 (15:40 +0100)
commit229f63f8c8ba61569afdc5440db4cf02caa45141
tree7abdc4f7f095ac889cf2b6e063eb11fa6dd3f22e
parent943180e1e5beb15ee1d3ee7aba06911d514acaba
mp3_afh: Detect both v1 and v2 tags.

Currently the mp3 audio format handler first looks at id3v2 tags and
ignores any id3v1 tags if a version 2 tag is present. This patch makes
it look at both types of tags, and combine the result if necessary.

We use the opportunity to also get rid of the file descriptor mess
in mp3_get_id3(). It is completely unnecessary as lib3d3tag can make
a id3_t structure from a memory buffer. We simply pass (a part of)
the memory map of the audio file and are done.

The techinfo field of struct audio_format_handler_info is changed
to show which tag versions the various tags were extracted. Possible
values are none, v1, v2 and v1+v2.
mp3_afh.c