]> git.tuebingen.mpg.de Git - paraslash.git/commit
The flac tagger.
authorAndre Noll <maan@systemlinux.org>
Wed, 25 Dec 2013 02:49:00 +0000 (02:49 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Apr 2015 12:13:34 +0000 (14:13 +0200)
commit63b46b233e069604bd66950ff7c4c827f3b2f7a6
tree8dcc710c01f078bad97bed1e494a0815f2a69d55
parent193fb831f608ba41c0198ae30a341b2e697c014f
The flac tagger.

This commit adds support to modify the vorbis comments of a flac
file. As usual, only the artist, title, album, year and comment tags
are supported.

As for the implementation, we first locate the vorbis comment
block by iterating over all metadata blocks. In this block
we replace each comment by the tags provided as an argument to
flac_rewrite_tags(). To work around a bug in old flac versions we
avoid to call FLAC__metadata_object_vorbiscomment_replace_comment(),
which would not replace tags as advertised. Instead we first delete
the comment and then append a new tag.

Once all tags have been replaced this way, we write out the temporary
file using FLAC__metadata_chain_write_with_callbacks_and_tempfile().
To do this we needed to convince libflac to not modify the original
file in place, which turned out to be more difficult than it should be.
error.h
flac_afh.c