output/pulse: fix crash during auto-detection
The PulseOutput needs to be "enabled" before WaitConnection() may be called. Closes #207
This commit is contained in:
parent
ea66cdd6a5
commit
ec408ca6a6
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
|||||||
ver 0.20.16 (not yet released)
|
ver 0.20.16 (not yet released)
|
||||||
|
* output
|
||||||
|
- pulse: fix crash during auto-detection
|
||||||
* database
|
* database
|
||||||
- simple: fix search within mount points
|
- simple: fix search within mount points
|
||||||
* fix crash in debug build on Haiku and other operating systems
|
* fix crash in debug build on Haiku and other operating systems
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "../Wrapper.hxx"
|
#include "../Wrapper.hxx"
|
||||||
#include "mixer/MixerList.hxx"
|
#include "mixer/MixerList.hxx"
|
||||||
#include "mixer/plugins/PulseMixerPlugin.hxx"
|
#include "mixer/plugins/PulseMixerPlugin.hxx"
|
||||||
|
#include "util/ScopeExit.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
#include <pulse/thread-mainloop.h>
|
#include <pulse/thread-mainloop.h>
|
||||||
@ -854,7 +855,10 @@ PulseOutput::TestDefaultDevice()
|
|||||||
try {
|
try {
|
||||||
const ConfigBlock empty;
|
const ConfigBlock empty;
|
||||||
PulseOutput po(empty);
|
PulseOutput po(empty);
|
||||||
|
po.Enable();
|
||||||
|
AtScopeExit(&po) { po.Disable(); };
|
||||||
po.WaitConnection();
|
po.WaitConnection();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (const std::runtime_error &e) {
|
} catch (const std::runtime_error &e) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user