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.
This commit is contained in:
Max Kellermann 2008-11-11 20:53:24 +01:00
parent 514c37b0cd
commit 67814eddff

View File

@ -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;