diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-23 17:41:39 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-23 17:49:43 -0400 |
commit | 62e102750912664dd1b1da720ce0c2b2c3071243 (patch) | |
tree | 440077f45fb3f3d397962a7498db1ca2164eb3ad | |
parent | 4879b340a235a69fa6d68927c8e4e662e5b8cb7a (diff) | |
download | enlightenment-62e102750912664dd1b1da720ce0c2b2c3071243.tar.gz |
try only 1 reconnect to pulse when mixer fails to init
this causes huge lag on failure with no termination case. if it fails
on the reconnect attempt then odds are it's never going to succeed
-rw-r--r-- | src/modules/mixer/lib/backends/pulseaudio/pulse.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c index a1db4c7ecb..fa869175cc 100644 --- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c +++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c @@ -810,17 +810,11 @@ _pulse_connect(void *data) } #endif c->context = pa_context_new_with_proplist(&(c->api), NULL, proplist); - if (!c->context) + if (c->context) { - WRN("Could not create the pulseaudio context"); - goto err; - } - - pa_context_set_state_callback(c->context, _pulse_pa_state_cb, c); - if (pa_context_connect(c->context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) - { - WRN("Could not connect to pulse"); - goto err; + pa_context_set_state_callback(c->context, _pulse_pa_state_cb, c); + if (pa_context_connect(c->context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) + ERR("Could not connect to pulse"); } #if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY) if (e_comp->comp_type != E_PIXMAP_TYPE_X) @@ -835,10 +829,6 @@ _pulse_connect(void *data) pa_proplist_free(proplist); return ECORE_CALLBACK_DONE; - - err: - pa_proplist_free(proplist); - return ECORE_CALLBACK_RENEW; } static Eina_Bool pulse_started; |