aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-15 18:23:04 +0100
committerMax Kellermann <max@duempel.org>2009-03-15 18:23:04 +0100
commit2b74311b0a9c90e1c8a7e289fbc46ed36b204e6e (patch)
tree99e261ffc999d6881f0b122546e40f21dcee3ba8
parenta899c210b9de405a232f0cd102ca9409ef89518b (diff)
downloadmpd-2b74311b0a9c90e1c8a7e289fbc46ed36b204e6e.tar.gz
mpd-2b74311b0a9c90e1c8a7e289fbc46ed36b204e6e.tar.xz
mpd-2b74311b0a9c90e1c8a7e289fbc46ed36b204e6e.zip
vorbis_encoder: pass vorbis_comment to tag helper functions
Prepare the removal of vorbis_encoder.vc.
Diffstat (limited to '')
-rw-r--r--src/encoder/vorbis_encoder.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c
index dc5444942..af325cbaa 100644
--- a/src/encoder/vorbis_encoder.c
+++ b/src/encoder/vorbis_encoder.c
@@ -264,34 +264,34 @@ vorbis_encoder_flush(struct encoder *_encoder, G_GNUC_UNUSED GError **error)
return true;
}
-static void add_tag(struct vorbis_encoder *encoder,
- const char *name, char *value)
+static void
+add_tag(vorbis_comment *vc, const char *name, char *value)
{
if (value) {
union {
const char *in;
char *out;
} u = { .in = name };
- vorbis_comment_add_tag(&encoder->vc, u.out, value);
+
+ vorbis_comment_add_tag(vc, u.out, value);
}
}
static void
-copy_tag_to_vorbis_comment(struct vorbis_encoder *encoder,
- const struct tag *tag)
+copy_tag_to_vorbis_comment(vorbis_comment *vc, const struct tag *tag)
{
for (unsigned i = 0; i < tag->num_items; i++) {
switch (tag->items[i]->type) {
case TAG_ITEM_ARTIST:
- add_tag(encoder, "ARTIST", tag->items[i]->value);
+ add_tag(vc, "ARTIST", tag->items[i]->value);
break;
case TAG_ITEM_ALBUM:
- add_tag(encoder, "ALBUM", tag->items[i]->value);
+ add_tag(vc, "ALBUM", tag->items[i]->value);
break;
case TAG_ITEM_TITLE:
- add_tag(encoder, "TITLE", tag->items[i]->value);
+ add_tag(vc, "TITLE", tag->items[i]->value);
break;
default:
@@ -310,7 +310,7 @@ vorbis_encoder_tag(struct encoder *_encoder, const struct tag *tag,
if (!vorbis_encoder_reinit(encoder, error))
return false;
- copy_tag_to_vorbis_comment(encoder, tag);
+ copy_tag_to_vorbis_comment(&encoder->vc, tag);
vorbis_encoder_send_header(encoder);