mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
paplay: check if pa_context_connect() succeed
This commit is contained in:
parent
6c8d851643
commit
2aeab75c68
1 changed files with 4 additions and 1 deletions
|
|
@ -400,7 +400,10 @@ int main(int argc, char *argv[]) {
|
||||||
pa_context_set_state_callback(context, context_state_callback, NULL);
|
pa_context_set_state_callback(context, context_state_callback, NULL);
|
||||||
|
|
||||||
/* Connect the context */
|
/* Connect the context */
|
||||||
pa_context_connect(context, server, 0, NULL);
|
if (pa_context_connect(context, server, 0, NULL) < 0) {
|
||||||
|
fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
|
||||||
|
goto quit;
|
||||||
|
}
|
||||||
|
|
||||||
/* Run the main loop */
|
/* Run the main loop */
|
||||||
if (pa_mainloop_run(m, &ret) < 0) {
|
if (pa_mainloop_run(m, &ret) < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue