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.
My work around is to send nullptr from the first call to ReadTag. This causes song_tag to be set to nullptr. Then the tag that I want to be attached to the stream is sent in the next call to ReadTag. This way it will no longer be overwritten. For me a more intuitive behaviour would be to set the stream_tag to song_tag before the first call to update_stream_tag, and only set stream_tag to values != nullptr returned from ReadTag in update_stream_tag. Regards, Pizzocel _______________________________________________ mpd-devel mailing list [email protected] http://mailman.blarg.de/listinfo/mpd-devel
