output/Thread: don't deinitialize the pipe in Close()

This commit is contained in:
Max Kellermann 2016-12-13 20:28:19 +01:00
parent 2bf91a0487
commit 6e643fe58b
2 changed files with 2 additions and 10 deletions

View File

@ -237,7 +237,7 @@ AudioOutput::Close(bool drain)
{ {
assert(open); assert(open);
pipe.Deinit(); pipe.Cancel();
open = false; open = false;
@ -288,11 +288,8 @@ void
AudioOutput::Reopen() AudioOutput::Reopen()
{ {
if (!config_audio_format.IsFullyDefined()) { if (!config_audio_format.IsFullyDefined()) {
if (open) { if (open)
const MusicPipe &old_pipe = pipe.GetPipe();
Close(true); Close(true);
pipe.Init(old_pipe);
}
/* no audio format is configured: copy in->out, let /* no audio format is configured: copy in->out, let
the output's open() method determine the effective the output's open() method determine the effective

View File

@ -56,11 +56,6 @@ public:
chunk = nullptr; chunk = nullptr;
} }
void Deinit() {
pipe = nullptr;
chunk = nullptr;
}
const MusicPipe &GetPipe() { const MusicPipe &GetPipe() {
assert(pipe != nullptr); assert(pipe != nullptr);