summaryrefslogtreecommitdiff
path: root/src/player
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-06-22 23:09:13 +0200
committerMax Kellermann <max@musicpd.org>2018-06-22 23:09:13 +0200
commite81b089612833b61c566b482640615e182949ac6 (patch)
treecfbd85faaa74c2c11f2954a94297089b6cec932f /src/player
parent9f14e7a98d8be5cc4b916456df0124b65ece8ae4 (diff)
MusicPipe: automatically clear in destructor
We can implement this now that we have a MusicBuffer reference.
Diffstat (limited to 'src/player')
-rw-r--r--src/player/Thread.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index e20b9b3a9..b359ec4b8 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -169,14 +169,9 @@ private:
xfade_state = CrossFadeState::UNKNOWN;
}
- void ClearAndDeletePipe() noexcept {
- pipe->Clear();
- delete pipe;
- }
-
void ClearAndReplacePipe(MusicPipe *_pipe) noexcept {
ResetCrossFade();
- ClearAndDeletePipe();
+ delete pipe;
pipe = _pipe;
}
@@ -1070,7 +1065,7 @@ Player::Run() noexcept
CancelPendingSeek();
StopDecoder();
- ClearAndDeletePipe();
+ delete pipe;
cross_fade_tag.reset();