Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
426bde3f
Commit
426bde3f
authored
Oct 24, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Thread: move check to SongHasVolatileTags()
parent
30e22b75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
Thread.cxx
src/decoder/Thread.cxx
+14
-1
No files found.
src/decoder/Thread.cxx
View file @
426bde3f
...
@@ -432,6 +432,19 @@ try {
...
@@ -432,6 +432,19 @@ try {
}
}
/**
/**
* Try to guess whether tags attached to the given song are
* "volatile", e.g. if they have been received by a live stream, but
* are only kept as a cache to be displayed by the client; they shall
* not be sent to the output.
*/
gcc_pure
static
bool
SongHasVolatileTags
(
const
DetachedSong
&
song
)
noexcept
{
return
!
song
.
IsFile
();
}
/**
* Decode a song addressed by a #DetachedSong.
* Decode a song addressed by a #DetachedSong.
*
*
* Caller holds DecoderControl::mutex.
* Caller holds DecoderControl::mutex.
...
@@ -446,7 +459,7 @@ decoder_run_song(DecoderControl &dc,
...
@@ -446,7 +459,7 @@ decoder_run_song(DecoderControl &dc,
file - tags on "stream" songs are just
file - tags on "stream" songs are just
remembered from the last time we
remembered from the last time we
played it*/
played it*/
song
.
IsFile
(
)
?
std
::
make_unique
<
Tag
>
(
song
.
GetTag
())
:
nullptr
);
!
SongHasVolatileTags
(
song
)
?
std
::
make_unique
<
Tag
>
(
song
.
GetTag
())
:
nullptr
);
dc
.
state
=
DecoderState
::
START
;
dc
.
state
=
DecoderState
::
START
;
dc
.
CommandFinishedLocked
();
dc
.
CommandFinishedLocked
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment