From ac96022c1de5573b9c4ff03990ac07c4bba8e3f9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 3 Nov 2008 18:24:01 +0100 Subject: decoder_api: automatically send stream tag If an input stream provides tags (e.g. from an icecast server), send them in the decoder_data() and decoder_tag() methods. Removed the according code from the mp3 and oggvorbis plugins - decoders shouldn't have to care about stream tags. This patch also adds the missing decoder_tag() invocation to the mp3 plugin. --- src/decoder/oggvorbis_plugin.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/decoder/oggvorbis_plugin.c') diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c index d5402aa66..f86bf3fc4 100644 --- a/src/decoder/oggvorbis_plugin.c +++ b/src/decoder/oggvorbis_plugin.c @@ -181,23 +181,14 @@ static struct tag *oggCommentsParse(char **comments) static void putOggCommentsIntoOutputBuffer(struct decoder *decoder, struct input_stream *is, - char *streamName, char **comments) { struct tag *tag; tag = oggCommentsParse(comments); - if (!tag && streamName) { - tag = tag_new(); - } if (!tag) return; - if (streamName) { - tag_clear_items_by_type(tag, TAG_ITEM_NAME); - tag_add_item(tag, TAG_ITEM_NAME, streamName); - } - decoder_tag(decoder, is, tag); tag_free(tag); } @@ -288,7 +279,6 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream) } comments = ov_comment(&vf, -1)->user_comments; putOggCommentsIntoOutputBuffer(decoder, inStream, - inStream->meta_name, comments); ogg_getReplayGainInfo(comments, &replayGainInfo); } -- cgit v1.2.3