From 67814eddff6f19b88ec0a1086bc242b029c20edc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Nov 2008 20:53:24 +0100 Subject: 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. --- src/decoder/mp3_plugin.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/decoder/mp3_plugin.c') 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; -- cgit v1.2.3