On 2014/12/15 00:14, Pizzocel <pizzo...@canis.uberspace.de> wrote:
> Hi,
> 
> I'm trying to write an input plugin. It determines the content of the
> tag at the time the stream is opened. I thought, the tag should then be
> delivered as the result of the first call to ReadTag. Subsequent calls
> should return nullptr, as the tag would not change until the stream is
> closed.
> But I found, that this did not work as I expected.
> The reason is, that when update_stream_tag in DecoderAPI.cxx gets
> nullptr from the second call to ReadTag (via LockReadTag, it overwrites
> the stream tag with song_tag.

A check is indeed missing: update_stream_tag() should only fall back
to the song's tag if LockReadTag()==nullptr and
decoder.stream_tag==nullptr.

If decoder.stream_tag has already been set previously, it should not
be replaced.
_______________________________________________
mpd-devel mailing list
mpd-devel@musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to