decoder_api: submit the song tag to the music pipe
When a new song starts playing, send its tag (song->tag) to the music pipe. This allows output plugins to render tags for all songs, not only those with embedded tags understood by the decoder plugin.
This commit is contained in:
@@ -189,12 +189,18 @@ update_stream_tag(struct decoder *decoder, struct input_stream *is)
|
||||
{
|
||||
struct tag *tag;
|
||||
|
||||
if (is == NULL)
|
||||
return false;
|
||||
tag = is != NULL
|
||||
? input_stream_tag(is)
|
||||
: NULL;
|
||||
if (tag == NULL) {
|
||||
tag = decoder->song_tag;
|
||||
if (tag == NULL)
|
||||
return false;
|
||||
|
||||
tag = input_stream_tag(is);
|
||||
if (tag == NULL)
|
||||
return false;
|
||||
/* no stream tag present - submit the song tag
|
||||
instead */
|
||||
decoder->song_tag = NULL;
|
||||
}
|
||||
|
||||
if (decoder->stream_tag != NULL)
|
||||
tag_free(decoder->stream_tag);
|
||||
|
Reference in New Issue
Block a user