aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mp3_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 20:53:24 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 20:53:24 +0100
commit67814eddff6f19b88ec0a1086bc242b029c20edc (patch)
tree6a69e3ff51dc5b2878e2b417161634b6281a3b62 /src/decoder/mp3_plugin.c
parent514c37b0cdf763e5bf9c487bd9d8b90930230e78 (diff)
downloadmpd-67814eddff6f19b88ec0a1086bc242b029c20edc.tar.gz
mpd-67814eddff6f19b88ec0a1086bc242b029c20edc.tar.xz
mpd-67814eddff6f19b88ec0a1086bc242b029c20edc.zip
mp3: support stream tags
Parse ID3 tags, even when they are in the middle of the stream. Very few streams provide embedded ID3 tags. Most of them send only Shoutcast "icy" tags, which limits the practical usefulness of this patch.
Diffstat (limited to '')
-rw-r--r--src/decoder/mp3_plugin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/decoder/mp3_plugin.c b/src/decoder/mp3_plugin.c
index 4729a267d..2b39a4162 100644
--- a/src/decoder/mp3_plugin.c
+++ b/src/decoder/mp3_plugin.c
@@ -1022,8 +1022,15 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r)
bool skip = false;
do {
- ret = decode_next_frame_header(data, NULL,
+ struct tag *tag = NULL;
+
+ ret = decode_next_frame_header(data, &tag,
replay_gain_info_r);
+
+ if (tag != NULL) {
+ decoder_tag(decoder, data->input_stream, tag);
+ tag_free(tag);
+ }
} while (ret == DECODE_CONT);
if (ret == DECODE_BREAK)
return false;