MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / UpdateStreamTag

Method UpdateStreamTag

src/decoder/Bridge.cxx:225–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225bool
226DecoderBridge::UpdateStreamTag(InputStream *is) noexcept
227{
228 auto tag = is != nullptr
229 ? is->LockReadTag()
230 : nullptr;
231 if (tag == nullptr) {
232 tag = std::move(song_tag);
233 if (tag == nullptr)
234 return false;
235
236 /* no stream tag present - submit the song tag
237 instead */
238 } else
239 /* discard the song tag; we don't need it */
240 song_tag.reset();
241
242 if (stream_tag && tag && *stream_tag == *tag)
243 /* not changed */
244 return false;
245
246 stream_tag = std::move(tag);
247 return true;
248}
249
250void
251DecoderBridge::Ready(const AudioFormat audio_format,

Callers

nothing calls this directly

Calls 1

LockReadTagMethod · 0.80

Tested by

no test coverage detected