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
ca450663
Commit
ca450663
authored
Aug 20, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Control: work around crash after SEEK was too late
See code comment. Closes
https://github.com/MusicPlayerDaemon/MPD/issues/629
parent
f3d16f6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
NEWS
NEWS
+2
-0
Control.cxx
src/decoder/Control.cxx
+12
-0
No files found.
NEWS
View file @
ca450663
...
...
@@ -3,6 +3,8 @@ ver 0.21.14 (not yet released)
- sidplay: show track durations in database
- sidplay: convert tag values from Windows-1252 charset
- sidplay: strip text from "Date" tag
* player
- fix crash after song change
ver 0.21.13 (2019/08/06)
* input
...
...
src/decoder/Control.cxx
View file @
ca450663
...
...
@@ -147,6 +147,18 @@ DecoderControl::Seek(SongTime t)
seek_error
=
false
;
SynchronousCommandLocked
(
DecoderCommand
::
SEEK
);
while
(
state
==
DecoderState
::
START
)
/* If the decoder falls back to DecoderState::START,
this means that our SEEK command arrived too late,
and the decoder had meanwhile finished decoding and
went idle. Our SEEK command is finished, but that
means only that the decoder thread has launched the
decoder. To work around illegal states, we wait
until the decoder plugin has become ready. This is
a kludge, built on top of the "late seek" kludge.
Not exactly elegant, sorry. */
WaitForDecoder
();
if
(
seek_error
)
throw
std
::
runtime_error
(
"Decoder failed to seek"
);
}
...
...
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