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:
parent
514c37b0cd
commit
67814eddff
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user