output/Thread: use Close() after error in ReopenFilter()

Now that CloseFilter() may be called again, we can reduce code
duplication.
This commit is contained in:
Max Kellermann 2016-09-04 15:09:51 +02:00
parent 9007dd9ab7
commit 3fea624cca

View File

@ -302,19 +302,7 @@ AudioOutput::ReopenFilter()
"Failed to open filter for \"%s\" [%s]", "Failed to open filter for \"%s\" [%s]",
name, plugin.name); name, plugin.name);
/* this is a little code duplication from Close(), Close(false);
but we cannot call this function because we must
not call filter_close(filter) again */
pipe = nullptr;
current_chunk = nullptr;
open = false;
fail_timer.Update();
mutex.unlock();
ao_plugin_close(this);
mutex.lock();
return; return;
} }